feat(cli): access team workspace collections and environments (#4095)
Co-authored-by: nivedin <nivedinp@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ export const handleError = <T extends HoppErrorCode>(error: HoppError<T>) => {
|
||||
ERROR_MSG = `Unable to parse -\n${error.data}`;
|
||||
break;
|
||||
case "INVALID_FILE_TYPE":
|
||||
ERROR_MSG = `Please provide file of extension type: ${error.data}`;
|
||||
ERROR_MSG = `Please provide file of extension type .json: ${error.data}`;
|
||||
break;
|
||||
case "REQUEST_ERROR":
|
||||
case "TEST_SCRIPT_ERROR":
|
||||
@@ -82,6 +82,21 @@ export const handleError = <T extends HoppErrorCode>(error: HoppError<T>) => {
|
||||
case "TESTS_FAILING":
|
||||
ERROR_MSG = error.data;
|
||||
break;
|
||||
case "TOKEN_EXPIRED":
|
||||
ERROR_MSG = `The specified access token is expired. Please provide a valid token: ${error.data}`;
|
||||
break;
|
||||
case "TOKEN_INVALID":
|
||||
ERROR_MSG = `The specified access token is invalid. Please provide a valid token: ${error.data}`;
|
||||
break;
|
||||
case "INVALID_ID":
|
||||
ERROR_MSG = `The specified collection/environment (ID or file path) is invalid or inaccessible. Please ensure the supplied ID or file path is correct: ${error.data}`;
|
||||
break;
|
||||
case "INVALID_SERVER_URL":
|
||||
ERROR_MSG = `Please provide a valid SH instance server URL: ${error.data}`;
|
||||
break;
|
||||
case "SERVER_CONNECTION_REFUSED":
|
||||
ERROR_MSG = `Unable to connect to the server. Please check your network connection or server instance URL and try again: ${error.data}`;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!S.isEmpty(ERROR_MSG)) {
|
||||
|
||||
Reference in New Issue
Block a user