MCPcopy Create free account
hub / github.com/auth0/auth0-cli / errorClassForHTTPStatus

Function errorClassForHTTPStatus

internal/cli/root.go:390–405  ·  view source on GitHub ↗
(status int)

Source from the content-addressed store, hash-verified

388}
389
390func errorClassForHTTPStatus(status int) string {
391 switch {
392 case status == 401 || status == 403:
393 return "auth"
394 case status == 400 || status == 422:
395 return "validation"
396 case status == 404:
397 return "not_found"
398 case status == 429:
399 return "rate_limit"
400 case status >= 500:
401 return "api"
402 default:
403 return "unknown"
404 }
405}

Callers 1

classifyCommandFailureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected