diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-27 20:21:38 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-27 20:21:38 -0300 |
| commit | f9f1d248f3a3a2b781507195e00527db1e39f8d3 (patch) | |
| tree | f99b24f5923e436339b8e8ddb8af6ac854488439 /lib/cepis/csv.ex | |
| parent | 075683ff44a254e99adbad8a0372ef80ff06151a (diff) | |
| download | elixir-071f0ea39f80d7dc8a81331e56ec1d9bb936893e.tar.gz | |
A CEP that fails is rarely a random number: it is usually someone who
knows the city and guessed, most often the -000 that 957 municipalities
never received. The API now answers 404 with an optional faixa naming
the municipality that number would have belonged to, so the caller can
say "you are in Areal, but not at that number" instead of a dead end.
It stays an error. Cepis.Faixa hangs off Cepis.NotFoundError as context
for the failure, never as an address, and parsing is deliberately
tolerant: an absent, truncated or unreadable faixa yields nil rather
than costing the caller a clean definitive answer.
The bounds are the smallest and largest CEP that actually exist there,
not the range the Correios publish, and almost nothing between them is
valid — hence ceps and density/1, so nobody reads the pair as a list of
numbers to try.
Diffstat (limited to 'lib/cepis/csv.ex')
0 files changed, 0 insertions, 0 deletions