Repository navigation
fix: corrige publishing, CI e resiliencia do cliente HTTP - #2
Merged
Merged
Conversation
…g do envelope de erro
Member
Author
|
Follow-up: baseUrl default padronizado para o path canonico https://api.ararahq.com (sem /api), conforme decisao do founder; o backend segue aceitando os dois. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Corrige os problemas apontados na auditoria do SDK Java (1.8.0 -> 1.8.1).
Mudancas
mvncontra umpom.xmlinexistente com JDK 11. Agora usa Gradle com JDK 17: build + test em push/PR e publish no GitHub Packages quando uma release e criada.RetryInterceptor(OkHttp) com backoff exponencial para falhas de rede, 5xx e 429, honrando o headerRetry-After(segundos e HTTP-date) e respeitandoconfig.maxRetries, que existia mas nunca era usado.AraraRateLimitException(estendeAraraApiException) com oretryAfterretornado pelo servidor;handleErrorResponseagora mapeia 429 alem de 401/403.AraraErrorpassa a mapear o envelope real da API{"error": {"code", "message", "details"}}, com fallback para o formato plano antigo e para body nao-JSON.Arara.builder()expoeconnectTimeout,readTimeout,writeTimeout,callTimeoutemaxRetries; o OkHttp agora configura write timeout (30s) e call timeout (2min) por padrao.CampaignService.createvalida os telefones dos contatos com a mesma regra doMessageService.send(prefixowhatsapp:+), alem de rejeitar request e lista de contatos nulos.gradle.properties(sem publicar).Sobre o
bin/: as classes compiladas existiam apenas no working tree local e nao estavam trackeadas no git; o.gitignoreja cobrebin/. Nada a remover do repositorio.Testes
./gradlew buildverde (JDK 17 via toolchain), incluindo os testes novos de retry, rate limit, parsing do envelope aninhado com fallback e validacao de contatos de campanha. Verificacao de cobertura JaCoCo (minimo 80%) passando.