Conversation
susnux
left a comment
There was a problem hiding this comment.
Is really every type error a bad request? This seems to be very broad as there could also just be application logic issues in the controller?
|
Hm yes it could also be the fault of the code, but I think it is way more likely that it happens when the method is called and the request didn't provide valid parameters. |
how expensive would it be to use reflections and check this before? |
|
Probably not expensive, since we already use reflection before to cast the values, but it will be a lot of messy code that might be incomplete. I would not go this route, so either we merge this PR or close it. |
|
This will be very painful for developers trying to figure out why something is not working during development 🙈 What I could see would be: when we have a TypeError, check if it's from the Controller::method call, if yes => debug, otherwise => error. |
7cc04dd to
5937a87
Compare
|
It was actually quite easy to check with reflection whether the TypeError happened when calling the controller method or if it happened later on. |
nickvergessen
left a comment
There was a problem hiding this comment.
🛑 Sounds okay to merge after branch off then? :P
|
@provokateurin Cypress seems to be related |
|
Runner 8 with theming/admin-settings.cy.ts or something else? |
…onses Signed-off-by: provokateurin <[email protected]>
5937a87 to
9473f47
Compare
|
Hm I do not get it, it was broken with 8 retries and a rebase just fixed it... |
Prevents error messages like this:
The server is not doing anything wrong in this case and there is nothing the admin can do about it, because client is not sending a valid request to the endpoint.