-
Notifications
You must be signed in to change notification settings - Fork 7
Account for network errors during user folder retrieval #332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rceptor isnt triggered
…e handled correctly
davetsay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but I just want to make sure you see this before approved.
I thought you said the unknown type check never happens, because the tree loading blocks the creation of the unknown object? If thats the case, maybe we shouldn't be coding for something that will never happen? If it does happen though, should we create an object Type to handle this, or maybe use another comparator such as object.unresolvedRequest===true (property name could need work), rather than a string check?
The check happens, the object never makes it to the UI though. The check is what prevents the request from going out, so it's working in that regard. Let's chat about the check. |
|



closes #240
If there's an error getting an object that is NOT a
404, then we return an error object, similar to how we return a missing object for missing... objects (in our case for user folders a404means we create the root object:openmct-mcws/src/persistence/BaseMCWSPersistenceProvider.js
Line 178 in 3f58be7
This addition of returning the error object, allows us to not try to save a missing object caused from a network error (no internet for example) in the case it's from an older persistence store that had folders on the backend, but no root object :
openmct-mcws/src/persistence/oldPersistenceFolderInterceptor.js
Line 52 in 3f58be7
Also added a retry loop. It will retry 3 times to get the object in 2, 4 and 8 second intervals at which point it will return the error object if there is still a network error.