summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 5e6c20c..2b25f32 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,8 +17,9 @@ async fn upstream_req(req: Request<Body>, config: ProxyConfig) -> Result<Respons
}
Err(other) => {
Response::builder()
- .status(StatusCode::NOT_FOUND)
- .body(format!("oh noooo! {:?}", other).into())
+ .status(StatusCode::INTERNAL_SERVER_ERROR)
+ .header("Content-Type", "application/json; charset=UTF-8")
+ .body(serde_json::to_string(&other.to_json()).unwrap().into())
.unwrap()
},
};