Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Allow simulation of connection errors #50

Closed
pjacekm opened this issue Nov 13, 2015 · 3 comments
Closed

Allow simulation of connection errors #50

pjacekm opened this issue Nov 13, 2015 · 3 comments

Comments

@pjacekm
Copy link

pjacekm commented Nov 13, 2015

While you can simulate server-side errors:

res.status(400).send({"error": "invalid_grant"});
res.status(500).send("Internal server error");

...you can't simulate "connection interrupted/dropped", "connection timeout", "slow network" and similar server/network failure scenarios. It would be an awesome addition to Dyson. Useful especially in situations where you are mocking or testing applications that are not executed in Web browsers (where some of these errors can be simulated using e.g. Chrome developer tools).

Maybe integrating with or implementing similar ideas as in Toxy project? ;)

@webpro
Copy link
Owner

webpro commented Nov 16, 2015

You can override the render method and inject your "poison" there, right?

@m3fawner
Copy link

@webpro that is correct. That is how I've implemented my error cases.

@webpro
Copy link
Owner

webpro commented Feb 14, 2016

I'm going to close this one. With 5f6d662 I hope to support more custom use cases and middlewares (like this one). Feel free (re)open, though.

@webpro webpro closed this as completed Feb 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants