Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r-k-b/popsicle-patch-bc-response
Patch responses from Business Catalyst to have useful HTTP status codes
https://github.com/r-k-b/popsicle-patch-bc-response
Last synced: 26 days ago
JSON representation
Patch responses from Business Catalyst to have useful HTTP status codes
- Host: GitHub
- URL: https://github.com/r-k-b/popsicle-patch-bc-response
- Owner: r-k-b
- License: agpl-3.0
- Created: 2015-11-26T09:46:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-26T10:37:28.000Z (about 9 years ago)
- Last Synced: 2024-04-26T03:44:41.964Z (8 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# popsicle-patch-bc-response
Business Catalyst doesn't set useful status codes on some of its responses.
This attempts to correct that by examining the response body and looking for
certain words, such as "unauthorised" and "please log in".
Designed to fit in with [popsicle](https://github.com/blakeembrey/popsicle)
and [popsicle-status.](https://github.com/blakeembrey/popsicle-status)## Example
const updateRequest = popsicle(requestOptions)
.after(patcher.patchAuthErrorResponses)
.use(status());