wrap error details in tuple