chore(backend): mejoras del code review (auth SAP, saneo de errores, deuda, seed)#32
Merged
Merged
Conversation
…da, seed) - SAP: 401/403 del OData ahora se mapean a Error.Unauthorized (antes 502); usa GetAsync + chequeo de status (como el adaptador Shopify) y maneja timeout. Guard ct.ThrowIfCancellationRequested al entrar. - ErrorHttpResults: ProblemDetails.Detail genérico para Unavailable/Unexpected (no filtra mensajes internos de SAP/Shopify/SQLite al cliente). El controlador loguea el detalle real (ILogger en SalesController + helper Fail). - DEUDA-TECNICA.md: nueva sección de paginación SAP; se quitan los TODO truncados de los adaptadores Shopify (ya cubiertos por #5/#6). - Program.cs: backoff del seed más corto (Cloud Run arranca rápido), comentario actualizado. - Tests (72 -> 76): SAP 401/403 -> Unauthorized; endpoint Unauthorized -> 401; ErrorHttpResults no filtra detalle en errores de servidor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Resultado del code review del backend. El backend ya estaba sólido (hexagonal limpio, Result/Error disciplinado, SQLite parametrizado, 72 tests); estas son mejoras menores acordadas.
Cambios
Error.Unauthorized(antes 502 genérico). El adaptador pasa deGetStringAsyncaGetAsync+ chequeo de status (como el de Shopify), maneja timeout y añadect.ThrowIfCancellationRequested()al entrar. → mejor diagnóstico de "API key mala".ProblemDetails.Detail: paraUnavailable/Unexpectedse devuelve un mensaje genérico al cliente (no se filtran textos internos de SAP/Shopify/SQLite). El controlador loguea el detalle real (ILogger+ helperFail).DEUDA-TECNICA.md; se eliminan los TODO truncados de los adaptadores Shopify (ya cubiertos por feat(backend): add SAP OData adapter as a second data source #5/feat(backend): persist sales in SQLite with an ingestion use case #6).Tests (72 → 76)
401/403 → Unauthorized(Theory).Unauthorized → 401.ErrorHttpResultsno filtra el detalle interno en errores de servidor.Verificación
dotnet test✅ 76/76.🤖 Generated with Claude Code