Fix/use error types for catch