diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-27 20:31:30 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-27 20:31:30 -0300 |
| commit | 67276c6444a70b61030ab3ee52b84dc5014af0e8 (patch) | |
| tree | ac0246ed287c6aec57e335403b20b23214ec4eb0 /tests/server/router.php | |
| parent | 64764fb9fac0227f8e0443e7c7519d73aec275b9 (diff) | |
| download | php-0674cf05ac9d9ff9698282742f01b2e88f536f03.tar.gz | |
The API now sends an optional faixa block on the 404 of GET /{cep}, naming
the municipality the CEP would have belonged to. That failing CEP is rarely
random: it is usually someone who knows the city and guessed the number,
most often the -000 that 957 municipalities never received. Knowing the
lookup failed "in Areal/RJ" is the difference between a message a user can
act on and a bare "CEP not found".
It stays an error. Faixa hangs off CepNotFoundException, never off Address,
and parsing is deliberately forgiving: a missing, empty or malformed block
yields null rather than turning a clean not-found into a parse failure.
Its cep_ini/cep_fim are the CEPs that exist, not the bounds the Correios
publish, and the interval between them is sparse -- hence ceps, and hence
the docblocks insisting the pair is not a list of valid CEPs.
Diffstat (limited to 'tests/server/router.php')
0 files changed, 0 insertions, 0 deletions