Function statusFromErrorCode