tiny-invariant icon indicating copy to clipboard operation
tiny-invariant copied to clipboard

Option to return error without the prefix

Open Yuripetusko opened this issue 2 years ago • 3 comments

it would be great to be able to pass an options like {prefix: false} which would return error message without the prefix

Yuripetusko avatar Sep 07 '22 00:09 Yuripetusko

This 100%! I am using Remix with ErrorBoundary and would love my error message to not have "Invariant Failed:" as part of it without having to wrap in a try catch and throw my own error.. not very friendly to the end user.

JasonWeise avatar Jan 16 '23 00:01 JasonWeise

This would be great

alexreardon avatar Jan 16 '23 05:01 alexreardon

I think this function should have 2 approaches.

  1. Configure the prefix globally, be able to remove or set a new prefix.

  2. Set the prefix or remove at function call level.

  3. (optional) to have prefix scopes.

victorlunam avatar Jun 15 '24 05:06 victorlunam