From 516254878b0b8f92a8ef4543bf5d0601aac3466d Mon Sep 17 00:00:00 2001 From: Murilo Ijanc Date: Mon, 27 Jul 2026 20:22:17 -0300 Subject: Carry the municipality of a nonexistent CEP on the 404 A CEP that fails is almost never a random number: it is someone who knows the city and guessed the digits, most often the -000 that 957 municipalities never received. The API now names the municipality that number would belong to, so the client surfaces it as CepNotFoundException.faixa instead of throwing away the one piece of information that makes the failure useful. It stays an exception. The block is context for a 404, not an address, and cep_ini/cep_fim are the smallest and largest CEP that actually exist there rather than the range the Correios publish -- the published start for Areal is the very CEP that just failed. The range is sparse (118 CEPs across some 9,000 numbers), which is what ceps is for. Parsing is deliberately total: absent, null, empty or malformed all yield null. Losing a clean not-found to a parse error over an optional field would be a bad trade. --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.gradle.kts') diff --git a/build.gradle.kts b/build.gradle.kts index 31ce4a7..1813169 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "org.cepis" -version = "0.1.0" +version = "0.2.0" repositories { mavenCentral() -- cgit v1.3