<feed xmlns='http://www.w3.org/2005/Atom'>
<title>php/src/CepNotFoundException.php, branch main</title>
<subtitle>PHP client for the public CEP API
</subtitle>
<id>http://git.cep.is/php/atom?h=main</id>
<link rel='self' href='http://git.cep.is/php/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.cep.is/php/'/>
<updated>2026-07-27T23:31:30Z</updated>
<entry>
<title>Carry the municipality of a not-found CEP on the exception</title>
<updated>2026-07-27T23:31:30Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-27T23:31:30Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/php/commit/?id=67276c6444a70b61030ab3ee52b84dc5014af0e8'/>
<id>urn:sha1:67276c6444a70b61030ab3ee52b84dc5014af0e8</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Initial import</title>
<updated>2026-07-26T17:58:55Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-26T17:58:55Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/php/commit/?id=64764fb9fac0227f8e0443e7c7519d73aec275b9'/>
<id>urn:sha1:64764fb9fac0227f8e0443e7c7519d73aec275b9</id>
<content type='text'>
</content>
</entry>
</feed>
