Skip to content

Handle missing openpath ids#79

Merged
robz merged 6 commits into
asmbly-makerspace:mainfrom
robz:debug-openpath-400s
Mar 30, 2026
Merged

Handle missing openpath ids#79
robz merged 6 commits into
asmbly-makerspace:mainfrom
robz:debug-openpath-400s

Conversation

@robz
Copy link
Copy Markdown
Contributor

@robz robz commented Mar 29, 2026

When OP accounts are created by the script, it sets a openpathid field on the corresponding neon account, so that it's easy to quickly update the OP account in the future.

If the OP account is manually created, or if the script fails to write the openpathid field back, the openpathid field can be missing. This causes the script to fail, since it'll attempt to recreated the OP account and encounter a 400 error.

Instead, detect these cases ahead of time by using the reverse edge (the external_id field on OP accounts is set to the neon account). Then write the OP account id back to the neon account again.

Also:

  • log the entire message when receiving 400s from openpath, so it's faster to debug failures in the future
  • skip attempting to make other mutations after receiving a 400
  • make openPathUpdateAll less verbose and clean up dead code, which make this harder to debug

@robz robz merged commit 42b32f0 into asmbly-makerspace:main Mar 30, 2026
1 check passed
@vlarie
Copy link
Copy Markdown
Contributor

vlarie commented Mar 30, 2026

Thank you for quickly addressing this and leaving a thorough and concise description for the record here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants