Organization restrictions return specific HTTP errors and status messages when
a request to a Google Cloud resource violates an access
restriction or contains an invalid header. You can use the following error
responses to troubleshoot request failures.

### Permission denied error message sample

If a request is denied due to an organization restrictions header violation, a 403
HTTP Response is returned with the following details:

    {
      "error": {
        "code": 403,
        "message": "Access denied by organization restriction. Please contact your administrator for additional information.",
        "status": "PERMISSION_DENIED",
        "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "ORG_RESTRICTION_VIOLATION",
            "domain": "googleapis.com",
            "metadata": {
              "service": "abc.googleapis.com"
            }
          }
        ]
      }
    }

### Malformed header error message sample

If a request contains a malformed `X-Goog-Allowed-Resources` header, a 400 HTTP response is returned with the following details:

    {
      "error": {
        "code": 400,
        "message": "Org Restriction Header is not valid. Please pass a valid Org Restriction Header.",
        "status": "INVALID_ARGUMENT",
        "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "ORG_RESTRICTION_HEADER_INVALID",
            "domain": "googleapis.com",
            "metadata": {
              "service": "abc.googleapis.com"
            }
          }
        ]
      }
    }