CarpServiceRequestException class

Exception for CAWS REST/HTTP service communication.

Thrown for non-success HTTP responses with a decodable JSON body, including CAWS application exceptions. The latter typically arise from CARP Core exceptions on the server side, which are mapped to HTTP status codes and messages sent back to the client. Transport failures and undecodable response bodies can propagate as other exceptions.

Inheritance
Implementers

Constructors

CarpServiceRequestException(String message, {required HTTPStatus httpStatus, String? exception, String? path})
CarpServiceRequestException.fromHttpStatus(int httpStatusCode, dynamic response)
Creates the matching exception from an HTTP httpStatusCode and the decoded JSON response body.
factory

Properties

exception ↔ String?
The Java exception from CARP Core.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
httpStatus ↔ HTTPStatus
The HTTP status from CAWS associated with this exception.
getter/setter pair
message → String
finalinherited
path ↔ String?
The URL path that caused the exception.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited