Rescue from errors with appropriate status codes