srctree

Gregory Mullen parent bc36f0a9 8c0769c2
add new generic network error

src/errors.zig added: 4, removed: 2, total 2
@@ -23,6 +23,7 @@ pub const NetworkError = error{
/// Common and usually banal error when the client disconnects before the
/// full response is delivered.
BrokenPipe,
IOWriteFailure,
};
 
pub const Error = ServerError || ClientError || NetworkError;
 
src/router.zig added: 4, removed: 2, total 2
@@ -303,6 +303,7 @@ pub fn defaultBuilder(vrs: *Frame, build: BuildFn) void {
error.OutOfMemory,
=> @panic("OOM"),
error.BrokenPipe => log.warn("client disconnect", .{}),
error.IOWriteFailure => log.err("generic write error", .{}),
error.Unrouteable => {
// Reaching an Unrouteable error here should be impossible as
// the router has decided the target endpoint is correct.