Migrate to AWS Partner Central 3.0 in 30 minutes.

Migrate now (opens in a new tab)
Skip to main content

How SaaSify reports failures, the HTTP status codes it sets, and what the common ones mean.

​How errors are returned

SaaSify reports failures two ways, and you must handle both:

  1. Inside the envelope, on HTTP 200. Many business errors come back with HTTP 200 OK and Status: "ERROR" in the body, with a message in ErrorMessage. If you branch only on the HTTP status, you'll miss these.
  2. As an HTTP status code. Transport and framework errors (auth, not found, bad input, server errors) set the HTTP status.

So the rule is: check the HTTP status and the Status field.

{
  "Status": "ERROR",
  "ErrorMessage": "Subscription not found for the given identifier.",
  "RequestCorrelationID": "f1e2d3c4-...",
  "Data": null
}
r = requests.post(url, json=body, headers=headers)
# 1. transport / framework errors
if r.status_code >= 400:
    raise RuntimeError(f"HTTP {r.status_code}: {r.text}")
# 2. business errors returned on HTTP 200
payload = r.json()
if payload["Status"] != "SUCCESS":
    raise RuntimeError(payload.get("ErrorMessage", "request failed"))

See Conventions for the full envelope.

ErrorDetail can contain a raw internal exception message. Don't parse it or depend on its shape — log it for diagnostics and use ErrorMessage and RequestCorrelationID for everything else. Include RequestCorrelationID when you contact support about a failed call.

​HTTP status codes

When SaaSify does set an HTTP status, it maps as follows:

HTTP statusWhen you'll see itWhat to do
200 OKSuccess — or a business error with Status: "ERROR" in the body.Always check the Status field before trusting Data.
400 Bad RequestInvalid input. Data carries the validation errors.Fix the request body or parameters; read Data for which field failed.
401 UnauthorizedMissing, invalid or expired token.Get a fresh token; refresh before expiry. See Authentication.
403 ForbiddenYour user's role lacks the permission for this operation ("Access denied"), or the user isn't a valid tenant user.Grant the required role permission to your service user, or fix the tenant context.
404 Not FoundA required argument was missing or invalid, or the route doesn't exist.Check the identifier and the path.
500 Internal Server ErrorAn unexpected server error.Retry transient failures with backoff; if it persists, contact support with the RequestCorrelationID.

403 is used both for a missing role permission and for a non-tenant user. If you get 403 on a call you expect to work, check the service user's role first.

​Common error situations

SituationHow it appearsWhat to do
Expired or missing bearer token401, or an auth errorRefresh the token or re-authenticate. See Authentication.
Service user lacks a permission403 "Access denied"Add the operation's role permission to the user.
Wrong tenant for a multi-tenant user403, or empty/foreign resultsSend the correct TenantCode at token time.
Unknown subscription / deal / resource ID200 with Status: "ERROR", or 404Verify the identifier type and value (see Identifiers).
Invalid request body400, validation errors in DataCorrect the fields named in Data.
Usage posted outside the allowed window, or rejected by the cloud200 with Status: "ERROR", or a later UsagePostingFailed eventPost within the cloud's reporting window; watch for the failure event. See Metering.
Pricing currency temporarily unavailableResponse header X-SaaSify-Warning: RATES_UNAVAILABLETreat the pricing as provisional and retry later. (Deal pricing only.)

​Provider-specific errors

Each cloud returns its own error strings for marketplace operations (activation, metering, private offers). These surface in ErrorMessage and in the subscription activity log.

Was this page helpful?