File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,16 @@ const context: AzureResourcesApiRequestContext = {
6363 ext .rgApiV2 .resources .registerAzureResourceBranchDataProvider (AzExtResourceType .ContainerAppsEnvironment , ext .branchDataProvider );
6464 },
6565
66- // Optional: Can use for error handling / telemetry
66+ // OPTIONAL: Can use for special error handling & telemetry
67+ // NOTE: Errors thrown during execution of this callback may be part of a separate process and may not bubble up to users.
68+ // If you wish to surface specific errors to users, please consider logging them or using the VS Code API to display them through UI.
6769 onApiRequestError : async (error : AzureResourcesApiRequestError ) => {
6870 switch (true ) {
69- case error .code === AzureResourcesHandshakeErrors .CLIENT_FAILED_CREATE_CREDENTIAL . code :
70- case error .code === AzureResourcesHandshakeErrors .HOST_CREATE_SESSION_FAILED . code :
71- case error .code === AzureResourcesHandshakeErrors .CLIENT_RECEIVED_INSUFFICIENT_CREDENTIALS . code :
72- case error .code === AzureResourcesHandshakeErrors .CLIENT_CREDENTIAL_FAILED_VERIFICATION . code :
73- case error .code === AzureResourcesHandshakeErrors .HOST_API_PROVISIONING_FAILED . code :
71+ case error .code === AzureResourcesApiRequestErrorCode .CLIENT_FAILED_CREATE_CREDENTIAL :
72+ case error .code === AzureResourcesApiRequestErrorCode .HOST_CREATE_SESSION_FAILED :
73+ case error .code === AzureResourcesApiRequestErrorCode .CLIENT_RECEIVED_INSUFFICIENT_CREDENTIALS :
74+ case error .code === AzureResourcesApiRequestErrorCode .CLIENT_CREDENTIAL_FAILED_VERIFICATION :
75+ case error .code === AzureResourcesApiRequestErrorCode .HOST_API_PROVISIONING_FAILED :
7476 default :
7577 }
7678 },
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ export interface AzureResourcesApiRequestContext {
2323 /**
2424 * Optional callback invoked when an error occurs during the Azure Resources API handshake process.
2525 *
26- * @remarks Errors thrown during execution of this callback may be part of a separate process and will not naturally bubble up to users.
27- * If you wish to surface specific errors to users, please consider using the VS Code API to display these manually .
26+ * @remarks Errors thrown during execution of this callback may be part of a separate process and may not bubble up to users.
27+ * If you wish to surface specific errors to users, please consider logging them or using the VS Code API to display them through UI .
2828 *
2929 * @param error - The error that occurred during the handshake, containing an error code and message.
3030 */
You can’t perform that action at this time.
0 commit comments