devhome
devhome copied to clipboard
[External Tools] External Tool JSON error handling
Suggested new feature or improvement
Right now, if there's a failure reading the external tools JSON file, we log the error, but don't attempt any mitigations. We should do the suggested mitigations so we can continue to function correctly.
- If we failed to parse the JSON file, we should rename it (using something like DateTime.Now in case we end up with multiples, this will help the user figure out what they did when), create a new one, and report to the user.
- For both adding and removing, if we're unable to write to the file, we should figure out why. If the file has become corrupted, we should rename it (using DateTime.Now or similar as above), create a new one, and report to the user. If it's locked, we just report to the user.
- On startup, when PI reads in its collection of registered tools via the JSON file, it can check that each one is still installed and in the same location as when registered. For any changes, pop a transient message dialog and update the JSON file.
- When the user invokes a tool from PI, PI should check that the invocation was successful. For failure, pop a transient message dialog and update the JSON file.