code: static CentralDogmaException convert(Throwable t) {
          t = Exceptions.peel(t);
  
          if (t instanceof CentralDogmaException) {
              return (CentralDogmaException) t;
          }
  
          ErrorCode code = ErrorCode.INTERNAL_SERVER_ERROR;
          if (t instanceof IllegalArgumentException) {
              code = ErrorCode.BAD_REQUEST;
          } else if (t instanceof EntryNotFoundException) {
              code = ErrorCode.ENTRY_NOT_FOUND;
          } else if (t instanceof RevisionNotFoundException) {
              code = ErrorCode.REVISION_NOT_FOUND;
          } else if (t instanceof QueryExecutionException) {
              code = ErrorCode.QUERY_FAILURE;
          } else if (t instanceof RedundantChangeException) {
              code = ErrorCode.REDUNDANT_CHANGE;
          } else if (t instanceof ChangeConflictException) {
              code = ErrorCode.CHANGE_CONFLICT;
          } else if (t instanceof ProjectNotFoundException) {
              code = ErrorCode.PROJECT_NOT_FOUND;
          } else if (t instanceof ProjectExistsException) {
              code = ErrorCode.PROJECT_EXISTS;
          } else if (t instanceof RepositoryNotFoundException) {
              code = ErrorCode.REPOSITORY_NOT_FOUND;
          } else if (t instanceof RepositoryExistsException) {
              code = ErrorCode.REPOSITORY_EXISTS;
          } else if (t instanceof ShuttingDownException) {
              code = ErrorCode.SHUTTING_DOWN;
          }
  
          final CentralDogmaException cde = new CentralDogmaException(code);
          cde.setMessage(t.toString());
          cde.initCause(t);
          return cde;
      }
docs: //// CentralDogmaException