- Updated onErrorResponse() to handle null values