I have custom error type named CustomError and I want to write a method that parses any type of error into my error structure. So I wrote