diff --git a/data_providers/vin01.js b/data_providers/vin01.js index 5f4afd9..9bb8f91 100644 --- a/data_providers/vin01.js +++ b/data_providers/vin01.js @@ -30,6 +30,12 @@ class Vin01Provider { let json = await result.json(); if(json.status == 200) { + if(json.data.status != 200) { + console.log('Vin01 failed to get GIBDD report with status: ', json.data.status, ', and error: ', json.data.message); + let vehicle = new Vehicle(); + vehicle.vin1 = vin; + return vehicle; + } console.log('vin01 found history'); let vehicle = Vehicle.fromVin01(json.data); vehicle.number = number;