WayrApp Backend & Ecosystem Documentation - v1.0.0
    Preparing search index...

    Module errorHandler

    Global error handling middleware and utilities for WayrApp Backend API

    This module provides error handling capabilities for the WayrApp language learning platform, including a custom error class, global error handler middleware, and async wrapper utility. It ensures consistent error responses across all API endpoints and provides proper error logging for debugging and monitoring purposes.

    Key Features:

    • Custom AppError class for structured application errors
    • Global error handler middleware for Express applications
    • Async handler wrapper for automatic error catching
    • Support for various error types (Zod, Prisma, generic errors)
    • Consistent error response format across the application
    • Comprehensive error logging with request context

    Exequiel Trujillo

    1.0.0

    Classes

    AppError

    Functions

    errorHandler
    asyncHandler