Comments (2)
For now I've updated Response::error
so it is only valid for error-related status codes. Adding a with_status
method is a good idea too and I will probably include it along with some other clean-up work.
from workers-rs.
Yea I think renaming this to Response::with_status
is fine. I like having an error
method though for spot-checking code, making it really easy to know immediately that a certain branch is returning a failure indicator.
Feel free to rename, and if you want to, we could add a Response::error
method which verifies that the code is within a true-to-spec error range. 400 - 599 would be a good start.
from workers-rs.
Related Issues (20)
- [Feature] Enable DurableObject Storage's `transaction` API
- Unable to use custom methods for CORS HOT 1
- [Feature] Contribution Guidance HOT 6
- [BUG] http feature is not additive HOT 2
- Make workers-kv a crate in this workspace HOT 1
- Introduce tests for DO transaction API
- Improve Release CI HOT 1
- [BUG] New http return types always use chunked transfer encoding HOT 6
- [Feature] Make `chrono-tz` an optional dependency HOT 8
- Improve top-level error handling HOT 3
- [BUG] `http` feature is not named accurately. HOT 1
- [BUG] `worker-kv` is not released together with other crates HOT 3
- [Feature] Add #[worker::trait_send] for async_trait
- 🤾♀️ [Feature] Most interop methods should be marked with `catch` HOT 4
- worker-kv does not serialize struct metadata HOT 3
- [BUG] CORS Access-Control-Allow-Origin set wrong if using multiple origins
- [BUG] Range requests in R2 are limited to 32 bit offset/length HOT 1
- [Feature] Make ObjectNamespace Send + Sync
- [BUG] No way to return pre-compressed data with Content-Encoding from worker-rs due to missing encodeBody option
- [BUG] templates/axum build error
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 workers-rs.