Skip to main content

Function: classifyShadowSubmitError

classifyShadowSubmitError(status, code?): "unavailable" | "disabled" | "rejected" | "unknown"

Prefers the body code (stable across status remaps) and falls back to the HTTP status. SHADOW_UNAVAILABLE is the only retryable case; SHADOW_RELAY_REJECTED is a terminal gateway rejection; SHADOW_UNSUPPORTED_TYPE and any other 400 map to "disabled".

Parameters​

ParameterType
statusnumber
code?string

Returns​

"unavailable" | "disabled" | "rejected" | "unknown"