leaky-ships/leaky-ships/lib/backend/errors.ts
2023-04-24 18:57:12 +02:00

24 lines
449 B
TypeScript

import { Logging } from "./logging"
export interface rejectionError {
message: string
statusCode: number
solved: boolean
type?: Logging[]
}
interface rejectionErrors {
[key: string]: rejectionError
}
export const rejectionErrors: rejectionErrors = {
gameNotFound: {
message: "Game not found!",
statusCode: 404,
solved: true,
},
unauthorized: {
message: "Unauthorized",
statusCode: 401,
solved: true,
},
}