We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6065df commit 2d3f6dcCopy full SHA for 2d3f6dc
src/commands/serve.rs
@@ -445,10 +445,25 @@ impl ServeCommand {
445
Ok(r) => Ok::<_, Infallible>(r),
446
Err(e) => {
447
eprintln!("error: {e:?}");
448
+ let error_html = "\
449
+<!doctype html>
450
+<html>
451
+<head>
452
+ <title>500 Internal Server Error</title>
453
+</head>
454
+<body>
455
+ <center>
456
+ <h1>500 Internal Server Error</h1>
457
+ <hr>
458
+ wasmtime
459
+ </center>
460
+</body>
461
+</html>";
462
Ok(Response::builder()
463
.status(StatusCode::INTERNAL_SERVER_ERROR)
464
+ .header("Content-Type", "text/html; charset=UTF-8")
465
.body(
- Full::new(bytes::Bytes::new())
466
+ Full::new(bytes::Bytes::from(error_html))
467
.map_err(to_errorcode)
468
.boxed(),
469
)
0 commit comments