DVBackendFunctionException class

A generated client function's call that the server refused or failed.

Thrown for every answer that is not a 2xx, so a failure is never handed back as if it were the function's result. message is the server's own error text when it sent one (a DVRefusal always does), otherwise the body, otherwise a short description of the status.

Implemented types

Constructors

DVBackendFunctionException(int statusCode, String message)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
isRefusal → bool
True when the server turned the request down on purpose (4xx); false when it failed (5xx and anything else).
no setter
message → String
The reason, ready to show the reader when the server refused on purpose.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → int
The HTTP status the server answered with.
final

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

Static Methods

throwUnlessSuccess(DVHttpResponse response) → void
Throws unless response is a success. Called by every generated typed client function before it decodes the answer.