feat(cli): access team workspace collections and environments (#4095)

Co-authored-by: nivedin <nivedinp@gmail.com>
This commit is contained in:
James George
2024-06-27 05:41:29 -07:00
committed by GitHub
parent fa2f73ee40
commit a9afb17dc0
48 changed files with 17569 additions and 13402 deletions

View File

@@ -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)) {