Hacker News new | ask | show | jobs
by bornfreddy 1350 days ago
While I am sympathetic with the developer, a large part of fault lies with them. Firewall actually behaved very nicely.

Always check status codes. Don't assume that backend (even if it is your own server) behaves as you think it should - complain when the response is not what you would have expected.

This is why I hate those error responses that encode the error message into JSON and return status 200. Gee, thanks - your backend is so special that it is an honor to write custom error handling for it. /s

Glad OP solved it in the end, but I would suggest reacting to all 4xx and 5xx statuses. It's a standard, if you get 418 you know what "your" backend is saying.