> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erixcel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# http-error.dto.ts

DTO global reutilizable que describe la respuesta de error HTTP en Swagger. Se referencia en los controllers con `@ApiResponse({ status: 400, type: HttpErrorDto })`.

```typescript http-error.dto.ts theme={null}
import { ApiProperty } from '@nestjs/swagger';
import { Trace } from 'traceflow';

@Trace({ type: "validation" })
export class HttpErrorDto {
  @ApiProperty({
    description: 'Error message(s)',
    oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
    example: ['password must be longer than or equal to 6 characters'],
  })
  message: string | string[];

  @ApiProperty({
    description: 'Error type',
    example: 'Bad Request',
  })
  error: string;

  @ApiProperty({
    description: 'Status code',
    example: 400,
  })
  statusCode: number;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.