Hi HNers,<p>I'm building a web app to simulate HTTP failures, such as incomplete requests and timeout because of idle socket. It's similar to a very basic Postman, but instead of to test API functionality, it tests how the backend handles bad requests.<p>Here is the current prototype https://networkbusted.web.app/ - it's not working at all, but wanted to share the idea here to get some opinions. Would you find such an app useful? How would you use it? Feedback would be really appreciated. Thanks!
I'm using Ruby on Rails for most of my web applications. It's very rare that you don't rely on the core wrapper classes that detect all of these network and system errors for you.<p>So when you receive an invalid request, most of the time the client gets back the appropriate HTTP status code (e.g. bad request when the bytes do not match the size of the request).<p>When you send an HTTP request e.g. to a payment provider, you need to take care of possible exceptions. This is a bit tricky, since it's hard to know all possible exceptions in advance and need to decide:<p>* You want to be noticed about the exception<p>* You want to ignore the exception<p>* You want to run additional code e.g. a re-try<p>With this background the workflow is as following:<p>* Watch for unhandled exceptions in production / staging<p>* Stub the exception, write a test and handle the error<p>Returning back to your application: When I understand it correctly, this would only help developers, that e.g. build their own web server or web framework. So I see the number of users for such a service very limited. And nit: I like the approach to have such a service running locally in a docker container like it is possible for <a href="https://github.com/chromium/badssl.com" rel="nofollow">https://github.com/chromium/badssl.com</a>, so you can use it for automated testing without network access.