[ocaml] rearrange error codes