Ensure that non-Error exceptions don't go undetected.
Changes
Compared to the usual strategy of using (err as Error).message, this function adds a fallback to just treating the value as a string. This avoids errors that aren't actually of type Error to be masked as described in https://concordium.atlassian.net/browse/CBW-780.
Purpose
Ensure that non-
Error
exceptions don't go undetected.Changes
Compared to the usual strategy of using
(err as Error).message
, this function adds a fallback to just treating the value as a string. This avoids errors that aren't actually of typeError
to be masked as described in https://concordium.atlassian.net/browse/CBW-780.