Respond with proper Error object in case of error