Skip to content

Report errors from backend when a request fails (attempt 2) - #148

Merged
confused-Techie merged 5 commits into
masterfrom
return-backend-error-messages-2
Jun 25, 2026
Merged

Report errors from backend when a request fails (attempt 2)#148
confused-Techie merged 5 commits into
masterfrom
return-backend-error-messages-2

Conversation

@confused-Techie

Copy link
Copy Markdown
Member

After we merged #147 it created significant conflicts with my original PR (as it touched all the exact same places my PR did). So for the benefit of the contributor we merged that one first, and I reworked this one.

If you'd like to read more about the original intentions of this PR (which are the same across the two attempts) feel free to look at #139


A major pain point for community package authors is that nearly every error on the backend is returned with Internal Server Error. I ensured to create as helpful of error messages as possible to try to alleviate this, until I learned that PPM itself was discarding those error messages and just returning a status code.

There were already hints in the code at wanting to fix this via request.getErrorMessage() but it is severely under-utilized. So all this PR does is ensure we use it everywhere applicable. So that our users always are getting the best error message possible.

Again for a more in-depth explanation feel free to refer to #139

@Daeraxa

Daeraxa commented Jun 22, 2026

Copy link
Copy Markdown
Member

And another one that seems to have been missed - is this one still active/relevant and looking to be merged?

@confused-Techie

Copy link
Copy Markdown
Member Author

And another one that seems to have been missed - is this one still active/relevant and looking to be merged?

Thanks for finding this one, but yes I'd still love to get this one merged and get human readable error messages into PPM!

Not sure if we want to run tests again for sanity, but if we do, we likely should wait on CI fixes to get into master from #161 and then we can update from master to rerun specs here

@Daeraxa

Daeraxa commented Jun 23, 2026

Copy link
Copy Markdown
Member

161 has landed at least so happy to have a proper look at this if brought up to speed with master

@confused-Techie

Copy link
Copy Markdown
Member Author

@Daeraxa I've updated this PR with changes from master for whenever you've got time

@Daeraxa

Daeraxa commented Jun 24, 2026

Copy link
Copy Markdown
Member

Did a bit of quick testing, wasn't able to get anything with a different error response displayed from some basic attempts from doing silly things but the changes don't look big enough to cause any issues either. Unofficial approval only im afraid.

@confused-Techie

Copy link
Copy Markdown
Member Author

Thanks a ton for the review @Daeraxa! But yeah for my testing I was targeting a specific error message to test with, so far to even mangle the data of my package on the database. But with these changes, any of the error messages we test for within the full HTTP tests on the backend should now be fully accessible.

But I'll go ahead and merge!

@confused-Techie
confused-Techie merged commit 0e290dc into master Jun 25, 2026
8 checks passed
@confused-Techie
confused-Techie deleted the return-backend-error-messages-2 branch June 25, 2026 01:39
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