Added error log to error response