Map the error code before you act: 1301 means reword the prompt, not retry; 1302/1303/1305 mean back off or raise limits; 1309/1311 mean billing or plan changes, not code changes; 1312 means fail over to a different model. Logging the raw code with each failure saves hours of guessing.

Context: Official docs (Model Studio error reference): documents model-side error codes such as 1301 (unsafe or sensitive content blocked), 1302/1303/1305 (concurrency, request rate, traffic limits), 1304/1310 (daily and weekly/monthly usage limits), 1309 (coding plan expired, needs renewal), 1311 (model not covered by your plan), and 1312 (model under high traffic, try another model).