MissingHeaderException class
Exception thrown when a required HTTP header is missing.
This exception indicates that a header that was expected or required for processing a request was not provided. It provides information about which header was missing through the headerType property.
The error details can be formatted for use in HTTP responses via the httpResponseBody property.
- Inheritance
-
- Object
- HeaderException
- MissingHeaderException
Constructors
- MissingHeaderException(String description, {required String headerType})
-
Creates a MissingHeaderException with a
descriptionof why the header is required and theheaderTypeindicating which header was missing.const
Properties
- description → String
-
Detailed description of the error.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerType → String
-
The type of header that caused the error.
finalinherited
- httpResponseBody → String
-
A formatted description of the error for inclusion in an HTTP response body.
no setteroverride
- 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