diff --git a/src/cli/cloud/cloud-api-errors.ts b/src/cli/cloud/cloud-api-errors.ts index e0f338c90f1..aac67d43291 100644 --- a/src/cli/cloud/cloud-api-errors.ts +++ b/src/cli/cloud/cloud-api-errors.ts @@ -34,6 +34,7 @@ function forbiddenMessage(reason: string | null): string { return 'This needs a signed-in Orca session, not an Orca API key or workspace token.' case 'not_owner': return 'Only the person who created this can do that.' + case null: default: return "You don't have access to do this." } @@ -78,6 +79,7 @@ function conflictMessage(reason: string | null): { message: string; nextSteps: s return { message: 'The same run is already queued. Nothing was queued.', nextSteps: [] } case 'project_name_taken': return { message: 'A project with that name already exists.', nextSteps: [] } + case null: default: return { message: "Orca Cloud couldn't do that right now. Nothing was changed.", diff --git a/src/cli/cloud/index-cloud-commands.test.ts b/src/cli/cloud/index-cloud-commands.test.ts index 3e57e7817d5..f5807db00ff 100644 --- a/src/cli/cloud/index-cloud-commands.test.ts +++ b/src/cli/cloud/index-cloud-commands.test.ts @@ -145,7 +145,9 @@ describe('orca cloud via main()', () => { ) await main(['cloud', 'workspace', 'destroy', 'sbx_d1', '--json'], home) expect(process.exitCode).toBeUndefined() - expect(fetchMock.mock.calls.map(([url, init]) => `${init?.method} ${url}`)).toEqual([ + expect( + fetchMock.mock.calls.map(([url, init]) => `${String(init?.method)} ${String(url)}`) + ).toEqual([ 'DELETE https://cloud.test/v1/workspaces/sbx_d1', 'DELETE https://cloud.test/v1/workspaces/sbx_d1' ])