Comments (2)
Hi! I've designed the library to be agnostic towards error handling. You can perform exception handling either within the operation handlers or simply catch from handleRequest
.
I always end up doing something like this:
try {
const response = await api.handleRequest();
return response;
} catch (err) {
return responseFromError(err);
}
from openapi-backend.
Thanks. I did exactly this in my fork of the library.
from openapi-backend.
Related Issues (20)
- Parameter query is not converted to correct type HOT 1
- Default value in parameter are not assign when the parameter is missing HOT 1
- Query parameter exploded object serialization
- Default type for Context and Handler prevents extension or override HOT 3
- GZIP compression for API responses? HOT 1
- no matches found
- Type Error when using required `PathParameters` in Context for a handler HOT 1
- definition parse errors on windows machines HOT 2
- Upgrade UI Features to make it more User-Friendly
- unknown format "date-time" ignored in schema HOT 5
- unknown format "uri" ignored in schema HOT 2
- Lack of Support for Form Explode Serialization in Query Parameters
- API Gateway with event.headers not working as expected HOT 3
- Runing MSW and Openapi-Backend in Vite
- Multiple errors on request validation HOT 3
- Decycle produce a wrong schema for schemas with `description`
- SyntaxError: Unexpected token '?'
- Is it possible to use openapi-backend for proxy HOT 1
- Incorrect / misleading error information provided when validating request body
- [Question] Is it possible to use openapi-backend to validate that the response of an API match an OpenAPI spec? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-backend.