rightify error handling