Repository navigation
1106 refactor centralizar o tratamento de erros das rotas bff de vacinas e transtornos - #1222
Merged
dariomatias-dev merged 9 commits intoNov 29, 2026
Conversation
7 tasks
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
dariomatias-dev
approved these changes
Nov 29, 2026
dariomatias-dev
deleted the
1106-refactor-centralizar-o-tratamento-de-erros-das-rotas-bff-de-vacinas-e-transtornos
branch
November 29, 2026 19:29
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.
O que mudou?
Este PR centraliza o tratamento de erros dos dez handlers BFF de vacinas e transtornos no helper
handleBffRouteError. As quatro rotas passam a usarNextResponse.json()em todos os retornos JSON, preservando os status e corpos existentes.Tarefas Relacionadas
Mudanças Realizadas
409 → 200nos doisPOST, o formato de erro com apenasmessagenoGETde vacinas e a validação e capitalização noPOSTde transtornos.Evidências
pnpm buildpassaram.instanceof AxiosErrornas quatro rotas ficou em1, 0, 1, 0, na ordem definida pela issue.400para transtorno inválido. As respostas verificadas tinhamContent-Type: application/json, com zero erros inesperados no Console.Busca paginada de vacinas
listagem de transtornos após a edição