Skip to content

Commit

Permalink
Revert error handling for standard queries (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptpaterson authored May 21, 2024
1 parent 9a12451 commit b799955
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fauna",
"version": "2.0.0",
"version": "2.0.1",
"description": "A driver to query Fauna databases in browsers, Node.js, and other Javascript runtimes",
"homepage": "https://fauna.com",
"bugs": {
Expand Down
15 changes: 2 additions & 13 deletions src/http-client/node-http2-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export class NodeHTTP2Client implements HTTPClient, HTTPStreamClient {
// a GOAWAY can come and cause the request to fail
// with a GOAWAY.
if (error?.code !== "ERR_HTTP2_GOAWAY_SESSION") {
// TODO: be more discernable about error types
throw new NetworkError(
"The network connection encountered a problem.",
{
Expand Down Expand Up @@ -205,12 +204,7 @@ export class NodeHTTP2Client implements HTTPClient, HTTPStreamClient {
.request(httpRequestHeaders)
.setEncoding("utf8")
.on("error", (error: any) => {
rejectPromise(
new NetworkError(
"The network connection encountered a problem while streaming events.",
{ cause: error },
),
);
rejectPromise(error);
})
.on("response", onResponse);

Expand All @@ -223,12 +217,7 @@ export class NodeHTTP2Client implements HTTPClient, HTTPStreamClient {

req.end();
} catch (error) {
rejectPromise(
new NetworkError(
"The network connection encountered a problem while streaming events.",
{ cause: error },
),
);
rejectPromise(error);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/package-version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//THIS FILE IS AUTOGENERATED. DO NOT EDIT. SEE .husky/pre-commit

/** The current package version. */
export const packageVersion = "2.0.0";
export const packageVersion = "2.0.1";

0 comments on commit b799955

Please sign in to comment.