import { errors } from './message';
import { ErrorCodeType, ErrorResponse } from './types/types';

export const makeErrorResponse = (errorcode: ErrorCodeType): ErrorResponse => {
  const msg = errors[errorcode];
  return {
    code: errorcode,
    message: msg,
  };
};
