<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ocaml/lib, branch v0.2.0</title>
<subtitle>OCaml client for the public CEP API
</subtitle>
<id>http://git.cep.is/ocaml/atom?h=v0.2.0</id>
<link rel='self' href='http://git.cep.is/ocaml/atom?h=v0.2.0'/>
<link rel='alternate' type='text/html' href='http://git.cep.is/ocaml/'/>
<updated>2026-07-27T23:42:18Z</updated>
<entry>
<title>Carry the municipality range on a not-found CEP</title>
<updated>2026-07-27T23:42:18Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-27T23:42:18Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/ocaml/commit/?id=218bc8fbfbbdc2520130ef43652a6cd22a6e67fb'/>
<id>urn:sha1:218bc8fbfbbdc2520130ef43652a6cd22a6e67fb</id>
<content type='text'>
A CEP that fails a lookup 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 naming the municipality whose band the number
falls into, so a caller can ask "did you mean somewhere in Areal/RJ?"
instead of returning a bare "not found".

Cep_not_found becomes an inline record so the context rides along with
the message, matching how Rate_limited and Server_error already carry
theirs. It is still a 404: faixa is context on the failure and never
promotes it to an address, and its bounds are the smallest and largest
CEP that actually exist there — sparse across the interval, which is
what the ceps count is for — not the bounds the Correios publish.

Parsing is deliberately lenient. A missing, null, malformed or
municipality-less faixa yields None rather than an error: a 404 is a
clean answer, and no shape of this field should turn it into an
Invalid_response.
</content>
</entry>
<entry>
<title>Initial import</title>
<updated>2026-07-26T15:21:46Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-26T15:21:46Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/ocaml/commit/?id=5598ea80735a51cb7b3690837b2b7d4240331b2d'/>
<id>urn:sha1:5598ea80735a51cb7b3690837b2b7d4240331b2d</id>
<content type='text'>
</content>
</entry>
</feed>
