chore(crm): log Lexware API error response body for debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Reitz 2026-03-11 11:57:52 +01:00
parent 00f6b9842e
commit b4d1f33862

View file

@ -154,8 +154,11 @@ export class LexwareClientService implements OnModuleInit {
axiosError.response?.statusText ||
axiosError.message ||
'Unbekannter Fehler';
const responseBody = axiosError.response?.data
? JSON.stringify(axiosError.response.data).substring(0, 500)
: '';
this.logger.error(
`Lexware API Fehler: ${method} ${path} -> ${status || 'NETWORK'}: ${msg}`,
`Lexware API Fehler: ${method} ${path} -> ${status || 'NETWORK'}: ${msg}${responseBody ? ` | Body: ${responseBody}` : ''}`,
);
throw error;
}