Messaging-logging (#11723)
parseBatchResponse: we need more logs to understand why we have some empty repsonse in the body. For anothe PR: ~~UNKNOWN_NETWORK_ERROR : moving from handleUnknownException to handleTemporaryException. This is important since in the logs I saw "The service is currently unavailable" which makes me think we should handle this type of error with as temporary~~
This commit is contained in:
@ -138,10 +138,21 @@ export class MicrosoftGetMessagesService {
|
||||
return response.body;
|
||||
}
|
||||
|
||||
if (!response.body) {
|
||||
this.logger.error(`No body found for response`, response);
|
||||
}
|
||||
|
||||
const errorParsed = response?.body?.error
|
||||
? response.body.error
|
||||
: {
|
||||
message:
|
||||
'Microsoft parseBatchResponse error: no response.body.error',
|
||||
};
|
||||
|
||||
return {
|
||||
error: {
|
||||
...response.body.error,
|
||||
statusCode: response.status,
|
||||
...errorParsed,
|
||||
statusCode: response?.status,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user