Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4050838
D1882.id4753.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
776 B
Referenced Files
None
Subscribers
None
D1882.id4753.diff
View Options
diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "limiting-factor"
-version = "0.3.0"
+version = "0.4.0"
authors = [
"Sébastien Santoro <dereckson@espace-win.org>",
]
diff --git a/src/api/replies.rs b/src/api/replies.rs
--- a/src/api/replies.rs
+++ b/src/api/replies.rs
@@ -135,6 +135,14 @@
Helper methods to prepare API responses
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+pub fn build_not_found_response() -> Failure {
+ Failure::from(Status::NotFound)
+}
+
+pub fn build_bad_request_response() -> Failure {
+ Failure::from(Status::BadRequest)
+}
+
pub fn build_internal_server_error_response(message: &str) -> Failure {
warn!(target:"api", "{}", message);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 06:02 (15 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2374173
Default Alt Text
D1882.id4753.diff (776 B)
Attached To
Mode
D1882: Build 400 and 404 HTTP replies
Attached
Detach File
Event Timeline
Log In to Comment