mirror of
https://github.com/stablyai/orca.git
synced 2026-11-17 19:34:29 +00:00
fix(cli): exhaustive error switches, typed test template
This commit is contained in:
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user