Add better error handling for non-200 responses