Custom error class for service operations
Provides structured error information with error codes and context for better debugging and error handling.
Create a new ServiceError
Human-readable error message
Error code for categorization
Additional context information
Optional
Original error that caused this error
Readonly
Original error that caused this error (if any)
Context information about the error
Timestamp when the error occurred
Get a formatted error message with context
Formatted error message
Convert error to JSON for logging
JSON representation of the error
Custom error class for service operations
Provides structured error information with error codes and context for better debugging and error handling.