Skip to content

Commit b799955

Browse files
authored
Revert error handling for standard queries (#268)
1 parent 9a12451 commit b799955

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fauna",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "A driver to query Fauna databases in browsers, Node.js, and other Javascript runtimes",
55
"homepage": "https://fauna.com",
66
"bugs": {

Diff for: src/http-client/node-http2-client.ts

+2-13
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export class NodeHTTP2Client implements HTTPClient, HTTPStreamClient {
9494
// a GOAWAY can come and cause the request to fail
9595
// with a GOAWAY.
9696
if (error?.code !== "ERR_HTTP2_GOAWAY_SESSION") {
97-
// TODO: be more discernable about error types
9897
throw new NetworkError(
9998
"The network connection encountered a problem.",
10099
{
@@ -205,12 +204,7 @@ export class NodeHTTP2Client implements HTTPClient, HTTPStreamClient {
205204
.request(httpRequestHeaders)
206205
.setEncoding("utf8")
207206
.on("error", (error: any) => {
208-
rejectPromise(
209-
new NetworkError(
210-
"The network connection encountered a problem while streaming events.",
211-
{ cause: error },
212-
),
213-
);
207+
rejectPromise(error);
214208
})
215209
.on("response", onResponse);
216210

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

224218
req.end();
225219
} catch (error) {
226-
rejectPromise(
227-
new NetworkError(
228-
"The network connection encountered a problem while streaming events.",
229-
{ cause: error },
230-
),
231-
);
220+
rejectPromise(error);
232221
}
233222
});
234223
}

Diff for: src/util/package-version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//THIS FILE IS AUTOGENERATED. DO NOT EDIT. SEE .husky/pre-commit
22

33
/** The current package version. */
4-
export const packageVersion = "2.0.0";
4+
export const packageVersion = "2.0.1";

0 commit comments

Comments
 (0)