UNPKG

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.

31 lines (30 loc) 1.03 kB
import BaseException from "./base.exception"; /** * @fileoverview No Items Found exception (HTTP 404) * @author dr. Salmi <reevosolutions@gmail.com> */ /** * Exception thrown when a search or list operation returns no results. * Corresponds to HTTP 404 Not Found status code. * * @class NoItemsFoundException * @extends {BaseException} * @example * ```typescript * throw new NoItemsFoundException('No users found matching criteria'); * throw new NoItemsFoundException('Search returned no results', { * query: 'advanced search terms' * }); * ``` */ declare class NoItemsFoundException extends BaseException { /** * Creates an instance of NoItemsFoundException. * * @param {string} [message='No items found'] - The error message * @param {Record<string, any>} [context] - Additional context about the search that returned no results * @memberof NoItemsFoundException */ constructor(message?: string, context?: Record<string, any>); } export default NoItemsFoundException;