Skip to content
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

Revert error handling for standard queries #268

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";
Loading