2
xyl0o
7y

Dear frontend dev,

if you can't check whether a variable is defined or not, why do i have to change the back end to accept urlparam='undefined' as valid and replace it with your default value in my backend? Why are you afraid of 40X's? You should be interested in the bugs of your code.

It feels awful to have a middleware in place catching all errors and replacing them with empty 200 responses 😭. All of this because you don't fucking ensure your variables exist before use.

Comments
  • 1
    "It's less error-prone."

    😭
  • 1
    It's just that frontend validations can be easily pampered and hence a backend validation provides stronger support
  • 0
    I know. Sane defaults are .. sane. But i would argue, if you fuck up your js and send an ill formatted url param, do not depend on the backend to guess that you want (or know what you wanted). Frontend logic does not belong to backend. At least be able to handle 400 errors or fix your code.
Add Comment