Fix returning error response