encapsulate error returns in ResultByError
some type edits in gpod