Move error codes inside Error class