Skip to content

Commit 5cb3f9d

Browse files
authored
fixup (#7117)
1 parent 98944bf commit 5cb3f9d

File tree

1 file changed

+1
-2
lines changed
  • packages/wrangler/src/hyperdrive

1 file changed

+1
-2
lines changed

packages/wrangler/src/hyperdrive/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ export function getOriginFromArgs<
154154
): PartialUpdate extends true ? OriginConfig | undefined : OriginConfig {
155155
if (args.connectionString) {
156156
const url = new URL(args.connectionString);
157-
const errorMessages = [];
158157
if (
159158
url.port === "" &&
160159
(url.protocol == "postgresql:" || url.protocol == "postgres:")
@@ -163,7 +162,7 @@ export function getOriginFromArgs<
163162
}
164163

165164
if (url.protocol === "") {
166-
errorMessages.push(
165+
throw new UserError(
167166
"You must specify the database protocol - e.g. 'postgresql'."
168167
);
169168
} else if (url.protocol !== "postgresql:" && url.protocol !== "postgres:") {

0 commit comments

Comments
 (0)