I started working on this and just wanted to see if I was on the right track. If I understand this correctly, I can set a catch in certain states to catch the error and give the error a variable name - in this case it would be "e" for the photo inference or "cancel" for the starting screen - and then in the screenState === 'error' path, I can somehow set it up to have unique messages for each error name - so for E, it could be something like "Unable to run inference" or in "cancel" it could be "User cancelled".
I started working on this and just wanted to see if I was on the right track. If I understand this correctly, I can set a catch in certain states to catch the error and give the error a variable name - in this case it would be "e" for the photo inference or "cancel" for the starting screen - and then in the screenState === 'error' path, I can somehow set it up to have unique messages for each error name - so for E, it could be something like "Unable to run inference" or in "cancel" it could be "User cancelled".