Troubleshoot the CLI errors by understanding their meanings and possible causes.
TOKEN_EXPIRED
The specified access token is expired. Please provide a valid token.Reason: The supplied access token via the
--token
flag has been expired.
TOKEN_INVALID
The specified access token is invalid. Please provide a valid token.Reason: The specified access token via the
--token
flag is invalid or might have been deleted.
INVALID_ID
The specified collection/environment (ID or file path) is invalid or inaccessible. Please ensure the supplied ID or file path is correct.
INVALID_SERVER_URL
Please provide a valid SH instance server URL.Reason: There are multiple cases in which this error can occur:
/v1/access-tokens/{collection/environment}/{path/id}
, resulting in a 404
network call error.application/json
, safeguarding against cases where the network call doesn’t fail, such as when the route is invalid as above, and checking against the content type (e.g., supplying the FE instance URL).ERR_INVALID_URL
as the error code from the network call). For instance, missing a protocol (e.g., http://
or https://
), having an invalid structure, or containing illegal characters.ENOTFOUND
as the error code from the network call). For instance, a typo in the domain name.SERVER_CONNECTION_REFUSED
Unable to connect to the server. Please check your network connection or server instance URL and try again.Reason: Found the server, but the server refused to connect (received
ECONNREFUSED
as the error code from the network call).