<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cpp/include/cepis, branch main</title>
<subtitle>C++ client for the public CEP API
</subtitle>
<id>http://git.cep.is/cpp/atom?h=main</id>
<link rel='self' href='http://git.cep.is/cpp/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.cep.is/cpp/'/>
<updated>2026-07-27T23:33:51Z</updated>
<entry>
<title>Expose the municipality behind a not-found CEP</title>
<updated>2026-07-27T23:33:51Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-27T23:33:51Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/cpp/commit/?id=2fb251996798798af38903fe535b8d147084a50a'/>
<id>urn:sha1:2fb251996798798af38903fe535b8d147084a50a</id>
<content type='text'>
A CEP that fails a lookup is rarely random: it is usually someone who
knows the city and guessed the number, and the classic guess is the -000
that 957 municipalities never received. The API now names, on the 404
itself, the municipality that CEP would have belonged to, so a caller can
say "not found — did you mean somewhere in Areal/RJ?" instead of just
"not found".

CepNotFound carries it as an optional Faixa. It stays an error: the block
is context, not an address, and the range it describes is sparse, which
is why it reports a count alongside the first and last CEP that actually
exist there rather than the bounds the Correios publish. Parsing it is
best-effort on purpose — a missing, empty or malformed block leaves the
optional empty, since a 404 is already the answer and reading the hint
attached to it must never cost the diagnosis.
</content>
</entry>
<entry>
<title>Initial import</title>
<updated>2026-07-26T15:28:10Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-26T15:28:10Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/cpp/commit/?id=b71faa6e95a0736f1ff171e006b171467b65db90'/>
<id>urn:sha1:b71faa6e95a0736f1ff171e006b171467b65db90</id>
<content type='text'>
</content>
</entry>
</feed>
