error.module:API 错误类

时间:2021-06-01 15:13:00
【文件属性】:
文件名称:error.module:API 错误类
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-01 15:13:00
JavaScript API 错误类 REST 应用程序的自定义错误类型 用法 // Import import ApiError from '@hope/error'; // Use let error = new ApiError({ message: "Custom error", code: 100, status: 500 }); // Send response response.json({ error: { code: 'APP-' + error.code, message: error.message, stack: error.stack, parent: { message: error.parent.message, stack: erro
【文件预览】:
error.module-master
----.eslintrc(89B)
----.travis.yml(220B)
----LICENSE(1KB)
----test()
--------errorSpec.js(4KB)
----index.es6(2KB)
----README.md(705B)
----.gitignore(41B)
----index.js(5KB)
----.eslintignore(29B)
----package.json(467B)

网友评论