MCPcopy Create free account
hub / github.com/Scalingo/cli / IsRegionDisabledError

Function IsRegionDisabledError

utils/errors.go:8–15  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

6)
7
8func IsRegionDisabledError(err error) bool {
9 var reqerr *http.RequestFailedError
10 if !errors.As(err, &reqerr) || reqerr.Code != 403 {
11 return false
12 }
13 httperr, ok := reqerr.APIError.(http.ForbiddenError)
14 return ok && httperr.Code == "region_disabled"
15}

Callers 1

CreateFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected