smarter error handling with status codes