All samples

Demo: Simulate random error responses from a custom API

This sample contains a demo web application connected to a placeholder API. Using Dev Proxy, you can simulate random errors returned by the API and see how the app handles them.

Waldek Mastykarz
Waldek Mastykarz

Demo: Simulate random error responses from a custom API

Summary

This sample contains a demo web application connected to a placeholder API. Using Dev Proxy, you can simulate random errors returned by the API and see how the app handles them.

Terminal window in VSCode showing Dev Proxy simulating random API errors

Compatibility

Dev Proxy v3.1.0

Contributors

Version history

Version Date Comments
1.10 July 1, 2026 Updated to Dev Proxy v3.1.0
1.9 June 17, 2026 Updated to Dev Proxy v3.0.1
1.8 May 30, 2026 Updated to Dev Proxy v3.0.0
1.7 March 26, 2026 Updated to Dev Proxy v2.3.0
1.6 March 11, 2026 Updated to Dev Proxy v2.2.0
1.5 February 4, 2026 Updated to Dev Proxy v2.1.0
1.4 January 18, 2026 Moved config files to .devproxy folder
1.3 January 5, 2026 Updated to Dev Proxy v2.0.0
1.2 June 27, 2025 Updated to Dev Proxy v0.29.2
1.1 December 2, 2024 Updated to Dev Proxy v0.23.0
1.0 January 26, 2024 Initial release

Prerequisites

Minimal path to awesome

  • Get the preset using Dev Proxy by running devproxy config get demo-randomerror-js
  • Navigate to the Dev Proxy installation folder, and open the config/demo-randomerror-js folder
  • Start the sample app and Dev Proxy by running npm start
  • In a web browser, navigate to http://localhost:3000 and interact with the sample app to see how it handles random errors

Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

You can try looking at issues related to this sample to see if anybody else is having the same issues.

If you encounter any issues using this sample, create a new issue.

Finally, if you have an idea for improvement, make a suggestion.

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.