首页 开发者工具 API Errors Simulator

API Errors Simulator

用户数 : 1000 分类 : 开发者工具 扩展大小 : 1.62MiB 最后更新时间 : 2019-11-18 版本 : 0.2.0
prev extension banner next extension banner
                            If you want to test how your frontend app behaves when backend API returns 4xx/5xx error codes, generally there are two options:
1. If you control the backend, you can manually return 4xx/5xx error codes in the API response.
2. Modify your frontend code to simulate error scenarios.
Neither of which is an elegant approach.

The API Errors Simulator chrome extension allows you to map backend API endpoints to the error codes you want to simulate for your application. Internally it patches browser's XMLHttpRequest API with the error codes supplied in the options page.

Once you've installed the extension, follow the steps to operate it:
1. Click on the newly added icon at right top of the browser and switch on the extension.
2. Click on the OPTIONS button. It'll open a page where you can supply rules with:
  i. The combination of URL and HTTP VERB
  ii. The response error code
3. You can also edit/delete your rules

Design Credit:
Name: Jainul Abedin
LinkedIn: https://www.linkedin.com/in/jainul-abedin-4148b816
Email: jainulmca@gmail.com
                        
查看更多
下载 如何离线安装? Chrome store

分享

全部评论

    展开更多评论

    错误提示保存失败
    成功提示保存成功
    close
    qr-code

    为打击盗链困扰,本站已启用公众号验证
    微信扫码关注上方公众号,回复“插件”二字获得验证码,验证码5分钟内全站有效。

    正在验证
    验证成功
    下载遇到问题?请添加QQ群:398095333
    close
    qr-code

    为打击盗链困扰,本站已启用公众号验证
    微信扫码关注上方公众号,回复“脚本”二字获得验证码,验证码5分钟内全站有效。

    正在验证
    验证成功