didww-otp_verification 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +7 -1
- data/lib/didww/otp_verification/errors.rb +3 -2
- data/lib/didww/otp_verification/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d642797b509a6a3a07315a163ac283086e3877a7d6304f88fb968995ad16f09
|
|
4
|
+
data.tar.gz: 6656b36bd906929a5397887573d1d1b40ed29fb3cecbe8add71ec5cc2355934d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c994241bc5f386def42788c2bc6d7b6fbad3050784de09a396252046343df7fa16cd8c6066df35a2168cbb101fffec56f2dded64d2a5d7ff82204e5c40e1683a
|
|
7
|
+
data.tar.gz: 8e3313f28b2c2327b5e73d31ba4b24d574981f89a4878089e584924dbc395035e1b86ea24c0a3d7622b68733e2bf1da8f26db6ea50e6c86828bf1f659a46cea0
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Version
|
|
|
6
6
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html): from 1.0.0 onwards a breaking change
|
|
7
7
|
to the public surface requires a major version.
|
|
8
8
|
|
|
9
|
+
## [1.3.0] — 2026-11
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`destination_prefix_rate_limited` error code**, raised as `RateLimitedError`
|
|
14
|
+
(429) from `start_verification` when there are too many verifications to a
|
|
15
|
+
number range. `#retry_after` carries the `Retry-After` wait in seconds; do not
|
|
16
|
+
retry it automatically.
|
|
17
|
+
- **`channel_blocked` error code.** A start can be refused with a 422 carrying it
|
|
18
|
+
when the account can't use the requested delivery method. Contact DIDWW
|
|
19
|
+
support.
|
|
20
|
+
|
|
9
21
|
## [1.2.0] — 2026-10
|
|
10
22
|
|
|
11
23
|
### Added
|
data/README.md
CHANGED
|
@@ -449,7 +449,7 @@ Non-2xx responses raise a typed error under `DIDWW::OTPVerification::Error`:
|
|
|
449
449
|
| `BalanceInsufficientError` | 402 | `balance_insufficient` |
|
|
450
450
|
| `NotFoundError` | 404 | `not_found` |
|
|
451
451
|
| `ValidationError` | 400 / 422 | `parameter_missing` / per-field codes |
|
|
452
|
-
| `RateLimitedError` | 429 | `destination_in_cooldown`, `rate_limit_*`, `volume_limit_reached` |
|
|
452
|
+
| `RateLimitedError` | 429 | `destination_in_cooldown`, `rate_limit_*`, `volume_limit_reached`, `destination_prefix_rate_limited` |
|
|
453
453
|
| `ServerError` | 5xx | `internal_error` |
|
|
454
454
|
|
|
455
455
|
Every error carries the API's coded envelope: `#errors` is an array of
|
|
@@ -473,6 +473,9 @@ rescue DIDWW::OTPVerification::ValidationError => e
|
|
|
473
473
|
end
|
|
474
474
|
```
|
|
475
475
|
|
|
476
|
+
`channel_blocked` (422): the account can't use the requested delivery method.
|
|
477
|
+
No verification is created; contact DIDWW support.
|
|
478
|
+
|
|
476
479
|
## Retries
|
|
477
480
|
|
|
478
481
|
The SDK does **not** auto-retry. If you add `faraday-retry`, exclude `POST`
|
|
@@ -490,6 +493,9 @@ A 429 raises `RateLimitedError`, and its code says which limit was hit:
|
|
|
490
493
|
- `volume_limit_reached`: the application reached its daily or monthly
|
|
491
494
|
verification limit. `Retry-After` can be long (days) — surface it to the
|
|
492
495
|
user instead of retrying. Contact support to raise the limit.
|
|
496
|
+
- `destination_prefix_rate_limited`: too many verifications to this number range;
|
|
497
|
+
try again later. Wait `Retry-After` before starting another one, and show the
|
|
498
|
+
user "Too many verification requests right now. Please try again later."
|
|
493
499
|
|
|
494
500
|
`#retry_after` gives the wait in seconds (`nil` if the `Retry-After` header is
|
|
495
501
|
missing or unparseable) — wait that long before trying again yourself; never
|
|
@@ -50,8 +50,9 @@ module DIDWW
|
|
|
50
50
|
|
|
51
51
|
# 429 Too Many Requests. +code+ says which limit was hit:
|
|
52
52
|
# +destination_in_cooldown+ (this destination was requested too recently),
|
|
53
|
-
# a +rate_limit_*+ request limit,
|
|
54
|
-
# monthly limit; +retry_after+ can be days)
|
|
53
|
+
# a +rate_limit_*+ request limit, +volume_limit_reached+ (a daily or
|
|
54
|
+
# monthly limit; +retry_after+ can be days), or +destination_prefix_rate_limited+
|
|
55
|
+
# (too many verifications to this number range; wait +retry_after+).
|
|
55
56
|
# Never auto-retry this.
|
|
56
57
|
class RateLimitedError < APIError
|
|
57
58
|
# @return [Integer, nil] seconds to wait, from the Retry-After header.
|