<feed xmlns='http://www.w3.org/2005/Atom'>
<title>autofill/test, branch main</title>
<subtitle>Drop-in address autofill widget for checkouts - vanilla JS
</subtitle>
<id>http://git.cep.is/autofill/atom?h=main</id>
<link rel='self' href='http://git.cep.is/autofill/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.cep.is/autofill/'/>
<updated>2026-07-27T23:37:47Z</updated>
<entry>
<title>Name the municipality behind a CEP that does not exist</title>
<updated>2026-07-27T23:37:47Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-27T23:37:47Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/autofill/commit/?id=c4032605e0833a4c74d9bf58e679a83349ce9fb1'/>
<id>urn:sha1:c4032605e0833a4c74d9bf58e679a83349ce9fb1</id>
<content type='text'>
A CEP lookup that fails is rarely a random number: it is usually someone
who knows the city and guessed the last digits, most often the -000 that
957 municipalities never received. The API now answers those 404s with a
`faixa` naming the municipality the number would have belonged to and the
first and last CEP that really exist there, so the shopper can be told
"esse número seria de Areal/RJ" instead of a bare "não encontrado".

It stays an error. The address does not exist, so no field is filled from
`faixa` — quietly writing the city of a CEP that does not exist would
produce a wrong address, which is worse than an empty form. Only the
wording of the message changes. The range is sparse (Areal has 118 CEPs
over some 4,900 numbers), so it is shown as a hint of where to look, never
as a list to pick from.

Parsing is defensive throughout: a body that is not JSON, a `faixa` that is
not an object, a missing localidade or uf, a malformed range — each falls
back to the message shipped before, and none of it can throw.
</content>
</entry>
<entry>
<title>Initial import</title>
<updated>2026-07-26T18:01:02Z</updated>
<author>
<name>Murilo Ijanc</name>
<email>murilo@ijanc.org</email>
</author>
<published>2026-07-26T18:01:02Z</published>
<link rel='alternate' type='text/html' href='http://git.cep.is/autofill/commit/?id=36486007ccada8c31d30e8f528d21233cabce32c'/>
<id>urn:sha1:36486007ccada8c31d30e8f528d21233cabce32c</id>
<content type='text'>
</content>
</entry>
</feed>
