data-point icon indicating copy to clipboard operation
data-point copied to clipboard

inputType/outputType describe when each fails

Open acatl opened this issue 7 years ago • 0 comments

  • data-point version:
  • node version:
  • npm version:

Problem description:

@raingerber said: it would be really helpful if the error message says where the type check happened (like whether it was called for inputType or outputType). however, we can wait and add that when we merge #149

@paulmolluzzo said:

Agreed, and this seems pretty important to include. The difference between if the type is wrong for inputType or outputType is whether the user has to debug the entire entity or not.

Suggested solution:

find a way to wrap the error or partial the error message so it tells the user at which modifier failed.

This idea might apply not only to inputType and outputType but to every modifier in the entity's lifecycle, so let's take that into account when sending a PR.

A solution might be to add a catch error to each modifier where we augment the error message with information about the failing modifier and rethrow the error.

acatl avatar Jan 17 '18 15:01 acatl