Lewis Youl
08/27/2025, 11:49 AM{
"key": "megatest",
"type": "resourceset",
"resource_id": "document",
"name": "megatest",
"description": "megatest",
"conditions": {
"allOf": [
{
"allOf": [
{
"resource.documentTypeId": {
"equals": "roflcopter"
}
},
{
"resource.owner": {
"equals": "123456"
}
}
]
}
]
},
"parent_id": null
}Ask Inkeep
08/27/2025, 11:50 AMAsk Inkeep
08/27/2025, 11:50 AMOr Weis
08/27/2025, 12:14 PMLewis Youl
08/27/2025, 12:21 PM{"level":50,"time":"2025-08-27T12:16:32.146Z","label":"<http://Permit.io|Permit.io>","msg":"Got error status code: 504, err: \"<html>\\r\\n<head><title>504 Gateway Time-out</title></head>\\r\\n<body>\\r\\n<center><h1>504 Gateway Time-out</h1></center>\\r\\n</body>\\r\\n</html>\\r\\n\""}
Failed to create condition set document-08a7b643-272f-460e-89fb-dba8b8848c48-c8217bd9-ed07-4898-b455-f9c9eb615977-resource-set: 3 | import { BASE_PATH } from '../openapi/base';
4 | import { API_ACCESS_LEVELS, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context';
5 | export class PermitApiError extends Error {
6 | originalError;
7 | constructor(message, originalError) {
8 | super(message);
^
Error:
originalError: AxiosError {
originalLine: 6,
originalColumn: 26,
stack: "Error\n at settle (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/axios/lib/core/settle.js:19:16)\n at handleStreamEnd (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/axios/lib/adapters/http.js:599:11)\n at emit (node:events:84:22)\n at endReadableNT (internal:streams/readable:862:50)\n at processTicksAndRejections (native:7:39)\n at <anonymous> (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/axios/lib/core/Axios.js:45:41)\n at processTicksAndRejections (native:7:39)",
message: "Request failed with status code 504",
name: "AxiosError",
code: "ERR_BAD_RESPONSE",
config: [Object ...],
request: [Object ...],
response: [Object ...],
status: 504,
toJSON: [Function: toJSON],
isAxiosError: true,
toString: [Function: toString],
},
at new PermitApiError (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/permitio/build/module/api/base.mjs:8:9)
at handleApiError (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/permitio/build/module/api/base.mjs:126:19)
at <anonymous> (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/permitio/build/module/api/condition-sets.mjs:105:18)
undefined
---
{"level":50,"time":"2025-08-27T12:15:40.322Z","label":"<http://Permit.io|Permit.io>","msg":"Got error status code: 504, err: \"<html>\\r\\n<head><title>504 Gateway Time-out</title></head>\\r\\n<body>\\r\\n<center><h1>504 Gateway Time-out</h1></center>\\r\\n</body>\\r\\n</html>\\r\\n\""}
Failed to create condition set document-08a7b643-272f-460e-89fb-dba8b8848c48-c8217bd9-ed07-4898-b455-f9c9eb615977-resource-set: 3 | import { BASE_PATH } from '../openapi/base';
4 | import { API_ACCESS_LEVELS, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context';
5 | export class PermitApiError extends Error {
6 | originalError;
7 | constructor(message, originalError) {
8 | super(message);
^
Error:
originalError: AxiosError {
originalLine: 6,
originalColumn: 26,
stack: "Error\n at settle (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/axios/lib/core/settle.js:19:16)\n at handleStreamEnd (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/axios/lib/adapters/http.js:599:11)\n at emit (node:events:84:22)\n at endReadableNT (internal:streams/readable:862:50)\n at processTicksAndRejections (native:7:39)\n at <anonymous> (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/axios/lib/core/Axios.js:45:41)\n at processTicksAndRejections (native:7:39)",
message: "Request failed with status code 504",
name: "AxiosError",
code: "ERR_BAD_RESPONSE",
config: [Object ...],
request: [Object ...],
response: [Object ...],
status: 504,
toJSON: [Function: toJSON],
isAxiosError: true,
toString: [Function: toString],
},
at new PermitApiError (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/permitio/build/module/api/base.mjs:8:9)
at handleApiError (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/permitio/build/module/api/base.mjs:126:19)
at <anonymous> (/Users/lewisyoul/Repositories/TrustFlight/1-tf/services/user-upstream/node_modules/permitio/build/module/api/condition-sets.mjs:105:18)
There's also the one that I shared the image of that happened via your UI which happened at Wed, 27 Aug 2025 11:41:43 GMT.`Lewis Youl
08/27/2025, 12:22 PMOr Weis
08/27/2025, 12:28 PMLewis Youl
08/27/2025, 12:29 PMLewis Youl
08/27/2025, 12:30 PMLewis Youl
08/27/2025, 2:16 PMβ {"level":50,"time":"2025-08-27T14:11:16.279Z","label":"<http://Permit.io|Permit.io>","msg":"Got error status code: 504, err: \"<html>\\r\\n<head><title>504 Gateway Time-out</title></head>\\r\\n<body>\\r\\n<center>< β
β Failed to remove condition rule for document:read: 3 | import { BASE_PATH } from '../openapi/base'; β
β 4 | import { API_ACCESS_LEVELS, ApiContextLevel, ApiKeyLevel, PermitContextError } from './context'; β
β 5 | export class PermitApiError extends Error { β
β 6 | originalError; β
β 7 | constructor(message, originalError) { β
β 8 | super(message); β
β ^ β
β Error: β
β originalError: AxiosError { β
β originalLine: 6, β
β originalColumn: 26, β
β stack: "Error\n at settle (/app/node_modules/axios/lib/core/settle.js:19:16)\n at handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:599:11)\n at emit (node:events:86:22)\n β
β message: "Request failed with status code 504", β
β name: "AxiosError", β
β code: "ERR_BAD_RESPONSE", β
β config: [Object ...], β
β request: [Object ...], β
β response: [Object ...], β
β status: 504, β
β toJSON: [Function: toJSON], β
β isAxiosError: true, β
β toString: [Function: toString], β
β }, β
β β
β at new PermitApiError (/app/node_modules/permitio/build/module/api/base.mjs:8:9) β
β at handleApiError (/app/node_modules/permitio/build/module/api/base.mjs:126:19) β
β at <anonymous> (/app/node_modules/permitio/build/module/api/condition-set-rules.mjs:81:18) β
β
β undefinedLewis Youl
08/27/2025, 2:17 PMOr Weis
08/27/2025, 2:17 PMLewis Youl
08/27/2025, 2:18 PMthis.permit.api.conditionSetRules.delete. So it's a different endpoint but related to condition sets again.Lewis Youl
08/27/2025, 2:21 PMYilmaz Alizadeh
08/27/2025, 2:21 PMOr Weis
08/27/2025, 2:22 PMLewis Youl
08/27/2025, 2:36 PMOr Weis
08/27/2025, 2:40 PMAlon Boshi
08/27/2025, 4:11 PMLewis Youl
08/27/2025, 4:15 PMLewis Youl
08/27/2025, 4:15 PMLewis Youl
08/27/2025, 4:15 PMAlon Boshi
08/27/2025, 4:43 PM/permit-ticket-status with the ticket PER-12695 to track the status also ππΌLewis Youl
08/29/2025, 8:54 AMOr Weis
08/29/2025, 8:58 AMLewis Youl
08/29/2025, 9:10 AMdocument resource. We are able to remove condition set rules for other resources such as document_type. The one to create resource sets fails intermittently for the same reason.Omer Zuarets
08/29/2025, 9:21 AMLewis Youl
08/29/2025, 9:29 AMLewis Youl
08/29/2025, 9:29 AMOmer Zuarets
08/29/2025, 9:30 AMLewis Youl
08/29/2025, 10:51 AMDELETE /v2/facts/9aa8bcdc454049cd8c1459f6d1215b4f/890e358221b34dee9ac6fb6103b762f8/set_rules - 504 Gateway Timeout
body:
{
"user_set": "c91cddb1-e571-46e5-821d-056b6e0100f4-user-set",
"resource_set": "document-50c415ef-5713-431a-96ac-2a1c7ce128d7-c8217bd9-ed07-4898-b455-f9c9eb615977-resource-set",
"permission":"document:update"
}
workspace: alex-trustflight-sandbox
project: sandbox
env: lewisdevelopment
I've attached an image for an identical request for document_type that is made just before the one for document. The document_type one always succeeds so I can see it in the api logs. The one for document always fails and I can't see it in the logs. This happens in different environments too, not just my one.
> The endpoints you attached until now were the create endpoint
I did mention this endpoint earlier in the thread too https://permit-io.slack.com/archives/C02RTML2WNN/p1756304306634849?thread_ts=1756295397.608009&cid=C02RTML2WNNAlon Boshi
08/31/2025, 4:15 PMLewis Youl
09/01/2025, 8:18 AMOmer Zuarets
09/01/2025, 8:27 AMLewis Youl
09/01/2025, 8:31 AMOmer Zuarets
09/01/2025, 8:33 AMLewis Youl
09/01/2025, 8:36 AMLewis Youl
09/01/2025, 2:15 PMAlon Boshi
09/01/2025, 2:16 PMLewis Youl
09/01/2025, 2:22 PMLewis Youl
09/02/2025, 12:52 PMAlon Boshi
09/02/2025, 12:55 PMLewis Youl
09/02/2025, 12:56 PMOmer Zuarets
09/02/2025, 7:04 PMYilmaz Alizadeh
09/03/2025, 3:58 PMLewis Youl
09/03/2025, 4:16 PM