Skip to content
Snippets Groups Projects
Commit bf07f915 authored by Leander Tolksdorf's avatar Leander Tolksdorf
Browse files

add generic catch to VehicleTypes.reloadData()

parent dc362fc3
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,8 @@ function VehicleTypes() {
},
})
.then((response) => response.json())
.then((data) => setVehicleTypes(data));
.then((data) => setVehicleTypes(data))
.catch((e) => console.log("Error while loading vehicle type\n:", e));
};
const addType = (type: any) => {
fetch("/api/vehicleType", {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment