You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
402 Billing issue. Mostly likely because you have exceeded the free tier quota.
546
+
403 Forbidden. Check your credentials.
547
+
409 Resouce conflict. Commonly raised when trying to create a sample that already exists in the function (Nyckel does not allow duplicate samples). When annotating an existing sample, use the PUT samples endpoint instead.
548
+
429 Throttled. You have exceeded either 25 requests per second or 25 concurrent requests.
549
+
500 Internal error. Retry -- ideally with exponential backoff.
550
+
503 Service temporarily unavailable. Retry -- ideally with exponential backoff.
551
+
"""
552
+
ifresponse.status_code==402:
553
+
raiseProviderException(
554
+
"Billing issue. Mostly likely because you have exceeded the free tier quota.",
555
+
response.status_code,
556
+
)
557
+
elifresponse.status_code==403:
558
+
raiseProviderException("Forbidden. Check your credentials.")
559
+
elifresponse.status_code==409:
560
+
raiseProviderException(
561
+
"Resouce conflict. Commonly raised when trying to create a sample that already exists in the function (Nyckel does not allow duplicate samples). When annotating an existing sample, use the PUT samples endpoint instead.",
562
+
response.status_code,
563
+
)
564
+
elifresponse.status_code==429:
565
+
raiseProviderException(
566
+
"Throttled. You have exceeded either 25 requests per second or 25 concurrent requests.",
567
+
response.status_code,
568
+
)
569
+
elifresponse.status_code==500:
570
+
raiseProviderException(
571
+
"Internal error. Retry -- ideally with exponential backoff.",
572
+
response.status_code,
573
+
)
574
+
elifresponse.status_code==503:
575
+
raiseProviderException(
576
+
"Service temporarily unavailable. Retry -- ideally with exponential backoff.",
577
+
response.status_code,
578
+
)
579
+
else:
580
+
raiseProviderException(
581
+
f"Unexpected error with status code {response.status_code}: {response.text}",
0 commit comments