ServerErrorResponse class

A model representing a server error response, typically for HTTP 500 errors.

Constructors

ServerErrorResponse({required String code, required String message, required int statusCode})
Creates a ServerErrorResponse instance.

Properties

code → String
The error code returned by the server.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
A human-readable message describing the error.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → int
The HTTP status code associated with the response.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts the ServerErrorResponse instance into a JSON map.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json, int statusCode) → ServerErrorResponse?
Factory constructor to parse a JSON map and status code into a ServerErrorResponse object.