import BaseException from "./base.exception"; /** * @fileoverview Unprocessable Entity exception (HTTP 422) * @author dr. Salmi */ /** * Exception thrown when the request is well-formed but contains semantic errors. * Corresponds to HTTP 422 Unprocessable Entity status code. * * @class UnprocessableEntityException * @extends {BaseException} * @example * ```typescript * throw new UnprocessableEntityException('Invalid data format'); * throw new UnprocessableEntityException('Business rule violation', { * email: { value: 'test@test.com', message: 'Email already exists' } * }); * ``` */ declare class UnprocessableEntityException extends BaseException { /** * Field-specific errors related to the unprocessable entity * @type {ErrorFields} */ readonly fields: ErrorFields; /** * Creates an instance of UnprocessableEntityException. * * @param {string} [message='Unprocessable Entity'] - The error message * @param {ErrorFields} [fields={}] - Field-specific errors * @param {Record} [context] - Additional context * @memberof UnprocessableEntityException */ constructor(message?: string, fields?: ErrorFields, context?: Record); /** * Returns a JSON representation of the unprocessable entity exception * * @returns {object} JSON representation including field errors * @memberof UnprocessableEntityException */ toJSON(): object; } export default UnprocessableEntityException;