Skip to content

HttpStatusError

A response that arrived intact but was not OK. Carries the status so retry logic can tell a transient 503 from a permanent 404 without parsing prose.

  • Error
new HttpStatusError(status: number, url: string): HttpStatusError;
ParameterTypeDescription
statusnumberThe HTTP status the server returned.
urlstringThe address that returned it, so the message names the target.

HttpStatusError

Error.constructor
PropertyModifierTypeDescriptionInherited from
cause?publicunknown-Error.cause
messagepublicstring-Error.message
namepublicstring-Error.name
stack?publicstring-Error.stack
statusreadonlynumberThe HTTP status the server returned.-