externalized error handling