10
anth12
6y

What idiot uses 0 for a success response!!! Integrating with a 3rd party I found a bug in our code that uses the default value for an int when the external server can't be reached.

As it happens 0 is the default integer in most languages so no surprise when our system accepted the 3rd party as a success when it blew up 😒

Comments
  • 7
    Exit code 0 implies no errors. Unless that's a typo, and you meant to say "failure" response.
  • 0
    @monr0e true. But in a web based API it it is obscene
  • 0
    As long as success and failure are enumerated into something readable, it doesn't matter what it returns as long as the rest of the code follows the same.
  • 0
    @rEaL-jAsE is any endpoint able to return 0 and a positive number? Because I don't understand the difference between neutral and positive
Add Comment