API: handle pq cancellation errors gracefully
1 files changed, 5 insertions(+), 0 deletions(-) M api/server.go
M api/server.go => api/server.go +5 -0
@@ 122,10 122,15 @@ func main() { if errors.Is(origErr, context.Canceled) { return origErr } if errors.Is(origErr, context.DeadlineExceeded) { return origErr } if origErr.Error() == "pq: canceling statement due to user request" { return origErr } stack := make([]byte, 32768) // 32 KiB i := runtime.Stack(stack, false) log.Println(string(stack[:i]))