import { ApiProperty } from '@nestjs/swagger';
import { ErrorCodes } from '../code';

export class ErrorResponse {
  @ApiProperty()
  message: string;
  @ApiProperty()
  code: string;
}

export type ErrorCodeType = (typeof ErrorCodes)[number];

export type Errors = {
  [P in ErrorCodeType]: string;
};
