fix 413 response parsing and retry logic