feelings
feelings3w ago

on deploy: error: Uncaught (in promise) Error: Expected JSON

My deployments were working fine , but suddenly started doing this:
(base) ➜ botfarms-api git:(main) ✗ deno task deploy
Task deploy deployctl deploy
ℹ Using config file '/Users/kennethchambers/Documents/GitHub/botfarms-api/deno.json'
⠸ Fetching project '6b7b06e7-a7ce-4aca-80d7-d943fa79cc7a' information...
error: Uncaught (in promise) Error: Expected JSON, got '
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>
'
throw new Error(`Expected JSON, got '${text}'`);
^
at API.#requestJson (https://jsr.io/@deno/deployctl/1.12.0/src/utils/api.ts:134:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async API.getProject (https://jsr.io/@deno/deployctl/1.12.0/src/utils/api.ts:210:14)
at async deploy (https://jsr.io/@deno/deployctl/1.12.0/src/subcommands/deploy.ts:202:17)
at async default (https://jsr.io/@deno/deployctl/1.12.0/src/subcommands/deploy.ts:171:3)
at async https://jsr.io/@deno/deployctl/1.12.0/deployctl.ts:108:5
(base) ➜ botfarms-api git:(main) ✗ deno task deploy
Task deploy deployctl deploy
ℹ Using config file '/Users/kennethchambers/Documents/GitHub/botfarms-api/deno.json'
⠸ Fetching project '6b7b06e7-a7ce-4aca-80d7-d943fa79cc7a' information...
error: Uncaught (in promise) Error: Expected JSON, got '
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>
'
throw new Error(`Expected JSON, got '${text}'`);
^
at API.#requestJson (https://jsr.io/@deno/deployctl/1.12.0/src/utils/api.ts:134:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async API.getProject (https://jsr.io/@deno/deployctl/1.12.0/src/utils/api.ts:210:14)
at async deploy (https://jsr.io/@deno/deployctl/1.12.0/src/subcommands/deploy.ts:202:17)
at async default (https://jsr.io/@deno/deployctl/1.12.0/src/subcommands/deploy.ts:171:3)
at async https://jsr.io/@deno/deployctl/1.12.0/deployctl.ts:108:5
1 Reply
feelings
feelingsOP3w ago
the command i'm using is deployctl deploy hmm.. not sure why but running: deno install -gArf jsr:@deno/deployctl fixed it