Update type guard (#204763)

This commit is contained in:
Logan Ramos 2024-02-08 12:37:39 -07:00 committed by GitHub
parent c1021c9573
commit 5303197950
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ class Temp {
}
}
function isCreateProvisionedFilesErrorResponse(response) {
return response?.ErrorDetails !== undefined;
return response?.ErrorDetails?.Code !== undefined;
}
class ProvisionService {
log;

View file

@ -70,7 +70,7 @@ interface CreateProvisionedFilesErrorResponse {
type CreateProvisionedFilesResponse = CreateProvisionedFilesSuccessResponse | CreateProvisionedFilesErrorResponse;
function isCreateProvisionedFilesErrorResponse(response: unknown): response is CreateProvisionedFilesErrorResponse {
return (response as CreateProvisionedFilesErrorResponse)?.ErrorDetails !== undefined;
return (response as CreateProvisionedFilesErrorResponse)?.ErrorDetails?.Code !== undefined;
}
class ProvisionService {