feat(backend): backfill error code on legacy error responses

This commit is contained in:
Lectom C Han committed 2026-02-13 11:20:15 +09:00
1 parent db71364e80
commit 1bc2cfb507
3 files changed
+143

No files matched your search

+3
View File
@@ -317,6 +317,9 @@ func main() {
EnableStackTrace: true,
}))
// Backfill `code` on legacy JSON error responses during migration period.
app.Use(middleware.ErrorCodeEnricher())
allowedOrigins := getEnv("CORS_ALLOWED_ORIGINS", "http://localhost:5000")
allowCredentials := allowedOrigins != "*"
app.Use(cors.New(cors.Config{