tonesto7 / fordpass-scriptable

FordPass Widget for Scriptable
GNU General Public License v3.0
169 stars 27 forks source link

#56 Null check and handle unexpected response #57

Closed gmatrangola closed 2 years ago

gmatrangola commented 2 years ago

I don't know why I'm getting these unexpected responses from the servers. I hope the REST protocol isn't changing. My changes just keep the widget from crashing but it doesn't display the information that is in the manufacturer's app like it used to. This happened after I ran the script and selected Widget Settings -> Reset Menu -> Reset Everything from the menu. Then ran again and entered my username, password and VIN. My Username and password were what I had stored in Lastpass and the vin was copy-pasted from the manufacturer's app.

gmatrangola commented 2 years ago

Ok, it's not as bad as I thought. See the update in the ticket #57 I had logged in with a valid username password but one that ad no VIN associated. But this change will allow the user to run the script and Clear Saved Settings to log in again. I suggest you accept this pull request and I'll provide another one that tells the user what's going on and sends them back to the login screen.