How to use generic error types?

This topic makes it look like it is starting to work / be useful for some usecases: