-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Summary
Error code 40300 is being used for multiple unrelated error conditions, causing confusion when debugging.
Observed behavior
When a JWT token has a prefix claim that doesn't match the promise ID being accessed, the server returns:
{
"error": {
"code": 40300,
"message": "The request is forbidden",
"details": [{
"@type": "ServerError",
"message": "unauthorized prefix",
"domain": "server",
"metadata": {
"url": "https://docs.resonatehq.io/operate/errors#40300"
}
}]
}
}Documentation says
40300 - The promise has already been resolved. Once a promise is resolved it can no longer be modified.
Problem
Two unrelated conditions share the same error code:
- Promise already resolved (immutability constraint)
- Unauthorized prefix (auth/permission issue)
Suggestion
Consider using distinct error codes:
40300- Promise already resolved40301or40310- Unauthorized prefix (or similar auth-related code)
Impact
Developers debugging JWT auth issues are directed to docs about resolved promises, which is confusing and slows down troubleshooting.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels