PesaBridge
Ìwé/Iṣẹ́ gidi/Errors

Iṣẹ́ gidi

Errors

One error shape, clear HTTP statuses, and when it's safe to retry.

Ìṣẹ́jú 3 láti kà

A kọ àwọn ìtọ́sọ́nà olùgbéṣẹ́ ní èdè Gẹ̀ẹ́sì kí kóòdù, orúkọ àwọn pápá àti àwọn ìfiránṣẹ́ àṣìṣe lè bá API mu gẹ́lẹ́.

Lórí ojú-ìwé yìí
  1. Error shape
  2. HTTP statuses

Error shape

JSON
{ "status": "error", "message": "amount must be positive", "code": null }

message is written for people and can be shown to your staff. Server errors also carry code: "internal_error" and a reference: quote it to support and we can find the exact request.

HTTP statuses

StatusMeaningRetry?
400Validation error: a field is missing or invalid.No. Fix the request.
401Missing, invalid or expired token or key.After getting a new token.
404The charge, transaction or resource doesn't exist for your app.No.
429Rate limit: too many requests or attempts.Yes, after backing off.
500Something went wrong on our side (with a reference).Yes, with the same idem key.
For any money movement, retry only with the same idempotency key. That's what makes retries safe.

Àwọn onímọ̀-ẹ̀rọ wa ń dáhùn ìbéèrè nípa ìsopọ̀. Fi nọ́mbà ìtọ́kasí ìbéèrè náà ránṣẹ́ sí wa, a ó sì rí ìpè náà gẹ́lẹ́.

Kàn sí ìrànlọ́wọ́