{"record":{"id":"b025ecdf06260314","repo":"hcengineering/platform","slug":"platform-status-forbidden-b025ec","errorCode":"platform.status.Forbidden","errorMessage":"Forbidden","messagePattern":"Forbidden","errorType":"http","errorClass":"PlatformError","httpStatus":403,"severity":"error","filePath":"packages/integration-client/src/request.ts","lineNumber":84,"sourceCode":"    }\n\n    const text = await response.text()\n    if (text.trim() === '') {\n      return undefined\n    }\n\n    try {\n      return JSON.parse(text)\n    } catch (error) {\n      console.warn('Failed to parse JSON response:', text, error)\n      return undefined\n    }\n  } else if (response.status === 202) {\n    return undefined\n  } else if (response.status === 401) {\n    throw new PlatformError(new Status(Severity.ERROR, platform.status.Unauthorized, {}))\n  } else if (response.status === 403) {\n    throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {}))\n  } else if (response.status === 404) {\n    throw new PlatformError(\n      new Status(Severity.ERROR, platform.status.ResourceNotFound, { resource: options.path ?? '' })\n    )\n  } else if (response.status >= 500) {\n    throw new PlatformError(new Status(Severity.ERROR, platform.status.InternalServerError, {}))\n  } else {\n    throw new PlatformError(new Status(Severity.ERROR, platform.status.BadRequest, { status: response.status }))\n  }\n}\n","sourceCodeStart":66,"sourceCodeEnd":95,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/packages/integration-client/src/request.ts#L66-L95","documentation":"The integration client maps HTTP 403 responses to PlatformError with status.Forbidden and message 'Forbidden'. Authentication succeeded, but the authenticated principal is not allowed to perform the requested operation.","triggerScenarios":"Any request() call where the integration service responds with HTTP status 403.","commonSituations":"Token valid but lacking permissions/roles for the resource; integration disabled or suspended server-side; trying to access another workspace's integration.","solutions":["Verify the authenticated user/role has permission for this integration or resource.","Check whether the integration is disabled/suspended and re-enable it.","Confirm you are operating in the intended workspace/account.","Contact an admin to grant the required permission if it should be allowed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isForbidden (err: unknown): err is PlatformError {\n  return err instanceof PlatformError && (err.status.code as number) === platform.status.Forbidden\n}","tryCatchPattern":"try {\n  await client.request(...)\n} catch (err) {\n  if (isForbidden(err)) {\n    // show 'insufficient permissions' message; do not retry blindly\n  } else {\n    throw err\n  }\n}","preventionTips":["Check user permissions/roles before exposing integration operations in UI.","Never retry 403 automatically — it is not transient.","Verify integration is enabled before operating on it."],"tags":["auth","forbidden","http-403","permissions"],"backgroundTag":"forbidden-403","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}