Error codes

environment_mismatch

Wrong environment

HTTP 401

At launchOnly a request signed by a signed credential is answered this way, and signed credentials can be registered from launch.

The signature verified, but X-SA-Environment isn't the credential's: TEST for a test credential, PRODUCTION for a live one.

The problem body

Sent as application/problem+json, with the request id in request_id and the X-Request-Id header. Branch on code: the error and detail sentences can change, and some operations add members of their own.

Example problem
{
  "error": "Wrong environment",
  "code": "environment_mismatch",
  "type": "https://secondappraisal.com/developers/errors/environment_mismatch",
  "title": "Wrong environment",
  "status": 401,
  "detail": "Wrong environment",
  "instance": "/api/gap/v1/referrals",
  "request_id": "req_4f9a2c7e1b8d4a6f9c3e2b1a7d5f8e0c"
}

Operations that can send it