"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createGeneralError = exports.createFieldErrors = exports.createFieldError = void 0;
const common_1 = require("@nestjs/common");
const config_1 = require("../config");
const createFieldError = (path, message, status = common_1.HttpStatus.BAD_REQUEST) => {
    return new config_1.ErrorResponse([{ path, message }], status);
};
exports.createFieldError = createFieldError;
const createFieldErrors = (errors, status = common_1.HttpStatus.BAD_REQUEST) => {
    return new config_1.ErrorResponse(errors, status);
};
exports.createFieldErrors = createFieldErrors;
const createGeneralError = (message, fieldPath = 'general', status = common_1.HttpStatus.BAD_REQUEST) => {
    return new config_1.ErrorResponse([{ path: fieldPath, message }], status);
};
exports.createGeneralError = createGeneralError;
//# sourceMappingURL=error-formatter.js.map