"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseHealthieFormResponseNotCreatedError = exports.HealthieFormResponseNotCreated = void 0;
class HealthieFormResponseNotCreated extends Error {
    constructor(errors) {
        super('Failed to create Healthie form response.');
        this.name = 'HealthieFormResponseNotCreated';
        this.errors = errors;
    }
}
exports.HealthieFormResponseNotCreated = HealthieFormResponseNotCreated;
const parseHealthieFormResponseNotCreatedError = (error) => {
    const category = 'BAD_REQUEST';
    const message = JSON.stringify(error, null, 2);
    return {
        date: new Date().toISOString(),
        text: {
            en: message,
        },
        error: {
            category,
            message,
        },
    };
};
exports.parseHealthieFormResponseNotCreatedError = parseHealthieFormResponseNotCreatedError;
//# sourceMappingURL=errors.js.map