Closed mabashian closed 2 months ago
@lgalis I abandoned the errorToAlertProps
approach and rolled a small utility function to parse the error and display the string. That utility function could probably be much more robust but I think it'll get the job done here in the short term.
Failed conditions
12.0% Duplication on New Code (required ≤ 3%)
This came up while testing attempting to sync EDA projects when Redis is down. The API responds with a 409 error and a body that looks like:
This change allows us to show the contents of the error message to the user like this:
Rather than the current UX:
This got a little bit messier than I thought it would but I looked for instances where we're using
errorToAlertProps
and the majority of them are here in EDA. There are a couple in Hub that I don't think will be impacted as only the error object is a required parameter.