Skip to content

Commit fbb229b

Browse files
committed
Updating docs with accurate error handling + pg version
1 parent 81e2b93 commit fbb229b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/content/docs/hyperdrive/examples/connect-to-postgres/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ The following examples show you how to:
7070

7171
### node-postgres / pg
7272

73-
Install the `node-postgres` driver:
74-
7573
<Render file="use-node-postgres-to-make-query" product="hyperdrive" />
7674

7775
### Postgres.js

src/content/partials/hyperdrive/use-node-postgres-to-make-query.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import { Render, PackageManagers } from "~/components";
66

77
Install the `node-postgres` driver:
88

9-
<PackageManagers pkg="pg@>8.13.0" />
9+
<PackageManagers pkg="pg@>8.16.3" />
1010

1111
:::note
1212

13-
The minimum version of `node-postgres` required for Hyperdrive is `8.13.0`.
13+
The minimum version of `node-postgres` required for Hyperdrive is `8.16.3`.
1414

1515
:::
1616

@@ -53,7 +53,7 @@ export default {
5353
} catch (error: any) {
5454
console.error("Database error:", error.message);
5555

56-
return Response.error();
56+
new Response('Internal error occurred', { status: 500 });
5757
}
5858
},
5959
};

0 commit comments

Comments
 (0)