fix(server,asana): return real error from /proceed-db-migration instead of bare 500 - #9068
Open
bujjibabukatta wants to merge 1 commit into
Open
fix(server,asana): return real error from /proceed-db-migration instead of bare 500#9068bujjibabukatta wants to merge 1 commit into
bujjibabukatta wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #9066.
/proceed-db-migrationwas returning a 500 with no body on upgrade, so there was no way to tell what actually failed without going into the container logs.Root cause
The endpoint wrapped
services.ExecuteMigration()inerrors.Must(), which panics on any error. Gin's recovery middleware turns that into an empty 500, so the real failure never made it back to the client.While looking for what's actually breaking on the beta12 -> beta15 upgrade path, I found
20260509000001_encrypt_connection_token.goin the asana plugin. It's new in beta13 and it's the first migration here that touchesENCRYPTION_SECRETduring the migration itself. If that key is missing or doesn't match what was used before, it fails - and because of the bug above, that failure was invisible.Fix
api.go: check the error fromExecuteMigration()and return it withshared.ApiOutputErrorinstead of panicking, same as the rest of the file already does.ENCRYPTION_SECRETisn't set, skip tokens that are already encrypted (so re-running after a failure doesn't double-encrypt them), and include the connection id if encryption fails on a row.Note: I can't confirm the asana part is the exact thing the reporter hit since there's no log/stack trace in the issue, but with the api.go fix the next attempt will actually show the real error, so we'll know for sure.