I understand, that using generic errors is easier for interfacing than custom errors, and probably good enough, however using Strings makes it kind of strange for testing and debugging, as it looses most of relevant information. I think that using anyhow would be as good as String, and would allow for more precise testing (instead of checking string value which is never good as slight changes affects it, such errors could be downcasted), and also have better feedback on failures.
The most problem I see with that, is breaking all the APIs and I am not sure if it is not too late for such a change.
I understand, that using generic errors is easier for interfacing than custom errors, and probably good enough, however using
Stringsmakes it kind of strange for testing and debugging, as it looses most of relevant information. I think that usinganyhowwould be as good asString, and would allow for more precise testing (instead of checking string value which is never good as slight changes affects it, such errors could be downcasted), and also have better feedback on failures.The most problem I see with that, is breaking all the APIs and I am not sure if it is not too late for such a change.