Skip to content

Commit

Permalink
fix: cannot log details because googleAdsError is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
htdangkhoa committed Oct 9, 2024
1 parent 50cad63 commit 881770f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LoggingInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class LoggingInterceptor {
([key, value]) => ![undefined, null].includes(value),
) ?? [];

const errorMessage = googleAdsError.message;
const errorMessage = googleAdsError?.message ?? responseStatus!.details;

messages.push(
`Body: ${errorMessage}`,
Expand Down

0 comments on commit 881770f

Please sign in to comment.