-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: login command improved error handling and explanation * chore: changeset
- Loading branch information
Showing
8 changed files
with
161 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"composable-cli": patch | ||
--- | ||
|
||
login command improved error handling and explanation |
8 changes: 6 additions & 2 deletions
8
packages/composable-cli/src/commands/login/epcc-authenticate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export type CLITaskErrorOptions = { | ||
message: string | ||
code: CLITaskErrorCode | ||
taskName: string | ||
description?: string | ||
} | ||
|
||
export type CLITaskErrorCode = | ||
| "missing_expected_context_data" | ||
| "request_failure" | ||
|
||
export class CLITaskError extends Error { | ||
/** | ||
* Unique error code for the error. | ||
*/ | ||
public code: CLITaskErrorCode | ||
/** | ||
* The name of the task that failed. | ||
*/ | ||
public taskName: string | ||
/** | ||
* A description of the error that is more details than the message you want to show to the user. | ||
*/ | ||
public description: string | undefined | ||
|
||
constructor({ message, code, taskName, description }: CLITaskErrorOptions) { | ||
super(message) | ||
this.name = "CLITaskError" | ||
this.code = code | ||
this.taskName = taskName | ||
this.description = description | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.