Hello everyone. Just started using pollination today for Annual Daylight recipes, and after a few succesful run, I keep geting this error when trying to start a run with the “Pollination” componente.
Thank you both! @Mingbo, I know that we discussed the challenges of catching this case with async nature of the process but is it possible to give a better error message / warning to user to know that the session has been expired? From the UI, one would think that they are still logged in.
I can try to match the key word “Not authenticated” in the error message and give a new popup dialog asking for login again. Unless @antoine has a better idea to catch none-authenticate case from server perspective, otherwise we will have to keep the message all the same across all api calls.
I can think of two things which might make Auth state a bit easier to handle in Grasshopper.
@Mingbo could use the status code of the API response and if it is 403 then knows that there is an authentication problem
Maybe the Grasshopper plugin login via the app the first time someone uses it on their machine and then create an API token to use for authenticating future requests. This way users would not have to login every time they open the grasshopper script