Fail hard if invalid make is passed
Closed this issue · 1 comments
gurpreetatwal commented
Currently if someone passes an unknown or misspelled make, we just return undefined/oauth/authorize?response_type=code&....
as the auth url. We should instead throw an error if the make is incorrect as the correct behavior leads to silent errors.
Lines 100 to 106 in 2d364ee
gurpreetatwal commented
We should also probably have an enum of sorts for the makes.
So instead of client.getAuthUrl('mock');
-> client.getAuthUrl(smartcar.MAKES.MOCK)