-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: improve error message for CH memory issues on public API #9191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c11c58d
to
6917b04
Compare
945464e
to
796b6af
Compare
One more thought: we should show the public API docs only for errors in the public API or drop the reference to the docs if easier. |
From what I understand so far, tRPC doesn't go through |
84388df
to
edc17b3
Compare
I think this would cover sufficient cases. After a week of this being in place we could just scan through our spans and see if there are any that still raised this up to the user. |
We resolved this in person. |
edc17b3
to
b39813b
Compare
524
that suits this case better. While in the public API I chose to stick with a more common HTTP error code.withMiddlewares
error handling behaviour.Important
Improves ClickHouse memory error handling by introducing
ClickHouseResourceError
and updating error handling logic inclickhouse.ts
,withMiddlewares.ts
, andtrpc.ts
, with corresponding tests added.ClickHouseResourceError
class inclickhouse.ts
to handle memory, overcommit, and timeout errors.queryClickhouse
,queryClickhouseStream
, andcommandClickhouse
inclickhouse.ts
to wrap errors usingClickHouseResourceError.wrapIfResourceError()
.withMiddlewares.ts
to handleClickHouseResourceError
by returning a 524 status code with advice message.trpc.ts
middleware to handleClickHouseResourceError
by setting aTIMEOUT
error code with advice message.clickhouse-resource-errors.servertest.ts
to test error transformation for ClickHouse errors.withMiddlewares.servertest.ts
to test error handling inwithMiddlewares
function.withMiddlewares.ts
andtrpc.ts
.This description was created by
for b39813b. You can customize this summary. It will automatically update as commits are pushed.