Skip to content

How To Write Error Messages

Aaron (Qilong) edited this page Mar 22, 2019 · 1 revision

The UX of failure is a tricky thing. In general a good scheme is:

  1. Tell the user what happened
  2. Explain to them why it is a problem
  3. Suggest what they can do to fix it

This scheme needs to be interpreted with some flexibility.

Examples of errors:

  • user has wired the wrong data type into a port (like a string into a double). Given the kind of data that is available in the node, we can throw an error that reads: "Warning: One or more of the input types are not matching, please check that the right variable types are being passed to the inputs. Couldn't find a version of (node method) that takes arguments of type (input type used,input type used)." So, for a String passed into a Point.ByCoordinates, the error message is: "Warning: One or more of the input types are not matching, please check that the right variable types are being passed to the inputs. Couldn't find a version of ByCoordinates that takes arguments of type (string,double)."

Notes

For (1) it's especially important to be clear when this is a problem in Dynamo, vs in the users' graph. Currently the two get conflated which makes it hard for users to know when they need to fix something and when they can leave it as it is.

Occasionally, though rarely, (2) - why it is a problem, is so obvious that there isn't really any need to say it. But bear in mind that the users' level of familiarity is generally less than ours.

(3) is harder. Sometimes it's easy to give advice, e.g. You passed types that cannot be used by this function. Please check the input types and additional converters. Sometimes it's much less obvious what the user can do to fix it.

In general, it's a good idea to err on the side of caution. It's worse to give a user a false suggestion as to how to fix something than to not give them a suggestion, as you can send them on the wrong track for a long time trying to fix 'the wrong' problem.

Releases

Roadmap

How To

Dynamo Internals

Contributing

Python3 Upgrade Work

Libraries

FAQs

API and Dynamo Nodes

Clone this wiki locally