https://github.com/slaveofcode/example-multi-error-handler-express
https://github.com/slaveofcode/example-multi-error-handler-express
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/slaveofcode/example-multi-error-handler-express
- Owner: slaveofcode
- Created: 2021-10-12T04:51:09.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T05:00:15.000Z (about 4 years ago)
- Last Synced: 2025-01-20T15:25:53.767Z (10 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# POC of Multi Error Handling via express router
## Installation
> npm i
## Running
> npm start
## Test API
```js
curl http://localhost:8989/ping # { "ok": true }
curl http://localhost:8989/v1/users # [{"name":"foo"},{"name":"bar"}]
curl http://localhost:8989/v1/users/2 # {"error":"something wrong v1-users: User inactive"}
curl http://localhost:8989/v1/users/3 # {"error":"User not found"}
```