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