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

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 v2.1.0

Contributors

Version history

VersionDateComments
1.5February 4, 2026Updated to Dev Proxy v2.1.0
1.4January 18, 2026Moved config files to .devproxy folder
1.3January 5, 2026Updated to Dev Proxy v2.0.0
1.2June 27, 2025Updated to Dev Proxy v0.29.2
1.1December 2, 2024Updated to Dev Proxy v0.23.0
1.0January 26, 2024Initial 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.