Try to decode the error response and log it.

Instead of logging a string, try to decode it as json (which it usually is), so that error loggers (like Sentry) can more easily display it.