diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-27 20:34:36 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-27 20:34:36 -0300 |
| commit | f2f3e5b5b22f5db49670391fb747a52fd492b9db (patch) | |
| tree | 3d02d13f3111bdd7381470d3fd3db1f58e00bc8c /LICENSE | |
| parent | 0bc578d6d334c7f1ccaf329cd61bb8bce76b7f59 (diff) | |
| download | perl-main.tar.gz | |
A CEP that fails is rarely a random number. It is usually someone who knows
the city and guessed the digits, and the classic guess is the -000 that 957
municipalities never received. The API now answers those 404s with a faixa
block naming the municipality that owns the band, so the library can say
"25845000 does not exist in Areal/RJ" instead of "not found".
It stays an error: lookup still throws Cepis::Error::CEPNotFound, and the
faixa hangs off the exception rather than turning a miss into an address.
Parsing it is deliberately forgiving — a missing, empty or malformed block
yields undef, because losing the clean not-found to a parse failure would be
a worse outcome than losing the context.
cep_ini and cep_fim are the smallest and largest CEP that actually exist,
not the bounds the Correios publish, and the interval between them is
sparse. That is why ceps is exposed alongside them and why the docs say
twice that the pair is not a list of valid CEPs.
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions