jsm-exceptions
Version:
A comprehensive TypeScript exception library with HTTP status code support, detailed JSDoc documentation, and backward compatibility. Provides structured error handling for web applications and APIs.
29 lines (28 loc) • 956 B
TypeScript
import BaseException from "./base.exception";
/**
* @fileoverview Item Not Found exception (HTTP 404)
* @author dr. Salmi <reevosolutions@gmail.com>
*/
/**
* Exception thrown when a requested item/resource cannot be found.
* Corresponds to HTTP 404 Not Found status code.
*
* @class ItemNotFoundException
* @extends {BaseException}
* @example
* ```typescript
* throw new ItemNotFoundException('User not found');
* throw new ItemNotFoundException('Product not found', { productId: '12345' });
* ```
*/
declare class ItemNotFoundException extends BaseException {
/**
* Creates an instance of ItemNotFoundException.
*
* @param {string} [message='Item Not Found'] - The error message
* @param {Record<string, any>} [context] - Additional context about the missing item
* @memberof ItemNotFoundException
*/
constructor(message?: string, context?: Record<string, any>);
}
export default ItemNotFoundException;