Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API regression #1729

Merged
merged 2 commits into from
Mar 12, 2021
Merged

Fix API regression #1729

merged 2 commits into from
Mar 12, 2021

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Mar 12, 2021

We incorrectly applied error handlers at each sub-route instead of applying it after grouping all sub-routes together. The result was that only getinfo (the first one tried) could actually be called.

The tests were changed to directly call the sub-routes so they didn't notice this issue. I fixed that by adding tests that failed with the previous code by simply using the top-level route.

I thought I had tested this E2E before merging #1690 but my (custom, poorly written) scripts in fact didn't correctly re-source my .bash_aliases so I was in fact testing master 🤦

cc @tompro

t-bast added 2 commits March 12, 2021 13:51
We incorrectly applied error handlers at each sub-route instead of applying
it after grouping all sub-routes together. The result was that only `getinfo`
could actually be called.
@t-bast t-bast requested a review from pm47 March 12, 2021 13:29
@t-bast t-bast merged commit 8dc64db into master Mar 12, 2021
@t-bast t-bast deleted the fix-api-regression branch March 12, 2021 17:32
@tompro
Copy link
Contributor

tompro commented Mar 13, 2021

So routing was canceled after the first miss? Really sorry just tested the getinfo route with this commit as I was hunting for the json error formatting. Need to get this E2E test setup running to prevent my custom poor manual testing and be more careful next time.

@t-bast
Copy link
Member Author

t-bast commented Mar 13, 2021

No worries, my tests should have caught that and failed to do so as well!

tompro pushed a commit to tompro/eclair that referenced this pull request Mar 21, 2021
We incorrectly applied error handlers at each sub-route instead of applying
it after grouping all sub-routes together. The result was that only `getinfo`
could actually be called.
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.

3 participants