Return the error object in case of error