aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/api/server.zig6
-rw-r--r--src/runtime.zig3
2 files changed, 3 insertions, 6 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig
index bed751f1b..137d164f0 100644
--- a/src/bun.js/api/server.zig
+++ b/src/bun.js/api/server.zig
@@ -2135,8 +2135,8 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
const result = JSC.C.JSObjectCallAsFunctionReturnValue(this.server.globalThis, this.server.config.onError.asObjectRef(), this.server.thisObject.asObjectRef(), 1, &args);
if (!result.isEmptyOrUndefinedOrNull()) {
- if (result.isError() or result.isAggregateError(this.server.globalThis)) {
- this.finishRunningErrorHandler(result, status);
+ if (result.toError()) |err| {
+ this.finishRunningErrorHandler(err, status);
return;
} else if (result.as(Response)) |response| {
this.render(response);
@@ -2514,7 +2514,7 @@ pub const WebSocketServer = struct {
active_connections: usize = 0,
/// used by publish()
- flags: packed struct (u2) {
+ flags: packed struct(u2) {
ssl: bool = false,
publish_to_self: bool = true,
} = .{},
diff --git a/src/runtime.zig b/src/runtime.zig
index c942afb13..197dc4264 100644
--- a/src/runtime.zig
+++ b/src/runtime.zig
@@ -116,7 +116,6 @@ pub const Fallback = struct {
};
pub inline fn scriptContent() string {
- if (true) return;
if (comptime Environment.isDebug) {
var dirpath = comptime bun.Environment.base_path ++ std.fs.path.dirname(@src().file).?;
var env = std.process.getEnvMap(default_allocator) catch unreachable;
@@ -166,7 +165,6 @@ pub const Fallback = struct {
fallback: string,
entry_point: string,
};
- if (true) return;
try writer.print(HTMLTemplate, PrintArgs{
.blob = Base64FallbackMessage{ .msg = msg, .allocator = allocator },
.preload = preload,
@@ -188,7 +186,6 @@ pub const Fallback = struct {
fallback: string,
bun_error_page_css: string,
};
- if (true) return;
try writer.print(HTMLBackendTemplate, PrintArgs{
.blob = Base64FallbackMessage{ .msg = msg, .allocator = allocator },
.bun_error_css = ErrorCSS.sourceContent(),