Skip to content

Commit d930f92

Browse files
committed
fix: authedFetch URL resolution breaks when DENO_DEPLOY_ENDPOINT contains a path
1 parent ba9131c commit d930f92

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export async function authedFetch(
303303
`token=${auth}; deno_auth_ghid=force`,
304304
);
305305

306-
const url = new URL(endpoint, context.endpoint);
306+
const url = new URL(`${context.endpoint}/${endpoint}`);
307307

308308
let fallbackBody: ReadableStream | undefined;
309309
if (init.body instanceof ReadableStream) {

util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function error(
2323
): never {
2424
console.error();
2525
console.error(`${red("✗")} An error occurred:`);
26-
console.error(` ${error.replaceAll("\n", "\n ")}`);
26+
console.error(` ${String(error ?? "Unknown error").replaceAll("\n", "\n ")}`);
2727
const trace = response?.headers.get("x-deno-trace-id");
2828
if (context.debug) {
2929
console.error(` stack:\n${new Error().stack}`);

0 commit comments

Comments
 (0)