Make error functions generic (#378)
Make error functions generic (#378)

This avoids having to convert the inner type.
project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak