exception library

Jetleaf Exception sub-library

This sub-library provides the core exception types used in the jetleaf_web package.

Importing package:jetleaf_web/exception.dart gives access to general exceptions, server-specific exceptions, and path-related exceptions used across the web, server, and routing modules.

This library centralizes the exception hierarchy for consistent error handling throughout the framework.

Exceptions / Errors

BadGatewayException
A specialized HttpException representing an invalid or failed response from an upstream server, corresponding to the HTTP 502 Bad Gateway status.
BadRequestException
A specialized HttpException that indicates a client-side request error corresponding to the HTTP 400 Bad Request status.
ConflictException
A specialized HttpException representing a resource state conflict,
corresponding to the HTTP 409 Conflict status.
ForbiddenException
A specialized HttpException representing an authorization failure,
corresponding to the HTTP 403 Forbidden status.
GatewayTimeoutException
A specialized HttpException representing an upstream service timeout,
corresponding to the HTTP 504 Gateway Timeout status.
HttpException
Base exception class for all HTTP operations in the JetLeaf web library.
HttpMediaTypeNotSupportedException
Exception thrown when a client sends a request with an unsupported media type.
HttpMessageNotReadableException
Thrown when the HTTP message body could not be read or parsed.
HttpMessageNotWritableException
Thrown when the HTTP response body could not be written.
InternalServerErrorException
A specialized HttpException representing an unexpected server failure,
corresponding to the HTTP 500 Internal Server Error status.
InvalidPathPatternException
Exception thrown when a path pattern used in routing or matching within the JetLeaf framework is invalid or cannot be parsed.
MaxUploadSizeExceededException
Exception thrown when the total upload size exceeds the allowed maximum.
MaxUploadSizePerFileExceededException
Exception thrown when a single uploaded file exceeds the per-file size limit.
MethodNotAllowedException
A specialized HttpException corresponding to the HTTP 405 Method Not Allowed status.
MultipartException
Base exception class for multipart upload-related errors.
MultipartParseException
Exception thrown when a multipart/form-data request cannot be parsed correctly.
NotAcceptableException
A specialized HttpException representing an unacceptable response format or media type negotiation failure, corresponding to the HTTP 406 Not Acceptable status.
NotFoundException
A specialized HttpException indicating that the requested resource could not be found (HTTP 404 Not Found).
PathMatchingException
Exception thrown when path matching fails unexpectedly during JetLeaf’s request routing or resource resolution.
PathVariableException
A specialized HttpException indicating an error in resolving or binding a path variable from the request URI.
PayloadTooLargeException
A specialized HttpException indicating that the client's request payload exceeds the server's allowed size, corresponding to the HTTP
413 Payload Too Large status.
RequestTimeoutException
A specialized HttpException representing a client request timeout,
corresponding to the HTTP 408 Request Timeout status.
ResponseAlreadyCommittedException
Exception thrown when attempting to modify an HTTP response that has already been committed.
ServiceUnavailableException
A specialized HttpException representing a temporary service outage,
corresponding to the HTTP 503 Service Unavailable status.
TooManyRequestsException
A specialized HttpException indicating rate limiting or quota exhaustion,
corresponding to the HTTP 429 Too Many Requests status.
UnauthorizedException
A specialized HttpException signaling that the client request lacks valid authentication credentials, corresponding to the HTTP 401 Unauthorized status.
UnsupportedMediaTypeException
A specialized HttpException representing an unsupported request content type,
corresponding to the HTTP 415 Unsupported Media Type status.
ViewResolutionException
Exception thrown when a view cannot be resolved or rendered during request processing.
WebServerException
Represents an unrecoverable runtime error that occurs within the JetLeaf WebServer or its request handling pipeline.