ErrorResponse class

Inheritance

Constructors

ErrorResponse({ResponseStatus status = ResponseStatus.internalServerError, required String message, Map<String, String>? errors})
const
ErrorResponse.badRequest({String message = "Bad request", Map<String, String>? errors})
factory
ErrorResponse.forbidden({String message = "Forbidden"})
factory
ErrorResponse.internalServerError({String message = "Internal server error"})
factory
ErrorResponse.notFound({String message = "Not found"})
factory
ErrorResponse.unauthorized({String message = "Unauthorized"})
factory

Properties

errors Map<String, String>?
final
hashCode int
The hash code for this object.
no setterinherited
message String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status ResponseStatus
finalinherited
success bool
finalinherited

Methods

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

Operators

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