summaryrefslogtreecommitdiffstats
path: root/dub.json
diff options
context:
space:
mode:
authorMurilo Ijanc <[email protected]>2026-07-27 20:37:09 -0300
committerMurilo Ijanc <[email protected]>2026-07-27 20:37:09 -0300
commita891657aa43d2aba06a6347dd2f94edd19afd6ba (patch)
treeb6369ed2c8485455f9c1aa707c1cd287cb8e7065 /dub.json
parent794f28199a4dde9d18ec711864336c96c58bb422 (diff)
downloadd-7cfbca977f267904ebcac7e10956876df780daf8.tar.gz
Carry the municipality a missing CEP would belong toHEADv0.2.0main
A 404 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 attaches a faixa to the not-found body naming the municipality that owns the range, so the caller can say "no such CEP, but that range is Areal/RJ" instead of only "no". It stays an error. Faixa hangs off CepNotFoundException, never off Address, and parsing is deliberately lenient: an absent, malformed or unnamed block yields a null Nullable, so reading the extra context can never cost the caller the answer it already had. cep_ini and cep_fim are the smallest and largest CEP that actually exist there, not the bounds the Correios publish, and the range between them is sparse — hence ceps, so nobody mistakes the pair for a list.
Diffstat (limited to 'dub.json')
-rw-r--r--dub.json2
1 files changed, 1 insertions, 1 deletions
diff --git a/dub.json b/dub.json
index 640f036..6e03a3d 100644
--- a/dub.json
+++ b/dub.json
@@ -1,6 +1,6 @@
{
"name": "cepis",
- "version": "0.1.0",
+ "version": "0.2.0",
"description": "Client for the public CEP API at cep.is (official Correios/DNE data)",
"authors": [
"Murilo Ijanc <[email protected]>"