http-rs / http-rs/http-types

macros should take a status code as their second argument

Open
#227 3 comments 0 reactions 0 assignees View on GitHub
semver-major
Dominant language
Rust
Stars
209
Forks
91
PR merge metrics
No merged PRs in 30d

Description

Using `ensure!` and pals currently always yield a 500 internal server errror. We should make it so that an `Into` must always be provided so these actually function as shorthands:

```rust
ensure!(tweet.len() < 140, 400, "Tweet must be under 140 characters");
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.