fix: add error message for invalid cuit
This commit is contained in:
@@ -15,6 +15,7 @@ type CuitError struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const NO_SEARCH_ARG = "Sin argumento de búsqueda"
|
const NO_SEARCH_ARG = "Sin argumento de búsqueda"
|
||||||
|
const INVALID_CUIT = "CUIT inválido"
|
||||||
|
|
||||||
func RequestHandler(w http.ResponseWriter, r *http.Request) {
|
func RequestHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
@@ -45,6 +46,8 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
} else {
|
} else {
|
||||||
errorResponse.Error = err.Error()
|
errorResponse.Error = err.Error()
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
errorResponse.Error = INVALID_CUIT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user