fix: add error message for invalid cuit

This commit is contained in:
2025-10-25 02:17:03 -03:00
parent 42e1bc2975
commit 8e1efa39ed

View File

@@ -15,6 +15,7 @@ type CuitError struct {
}
const NO_SEARCH_ARG = "Sin argumento de búsqueda"
const INVALID_CUIT = "CUIT inválido"
func RequestHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
@@ -45,6 +46,8 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) {
} else {
errorResponse.Error = err.Error()
}
} else {
errorResponse.Error = INVALID_CUIT
}
}
}