"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BadParamsError = void 0;
const ServiceError_1 = require("./ServiceError");
const SERVICE_NAME = process.env.SERVICE_NAME || 'SERVICE_NAME_NOT_DEFINED';
class BadParamsError extends ServiceError_1.ServiceError {
    constructor(message, params) {
        super(400, false, message);
        this.params = params;
    }
    toString() {
        return `BadParamError in ${SERVICE_NAME}: ${this.message}`;
    }
    toErrorObject() {
        return Object.assign(Object.assign({}, super.toErrorObject()), { params: this.params });
    }
}
exports.BadParamsError = BadParamsError;
//# sourceMappingURL=BadParamsError.js.map