public static ErrorCode valueOf(int value) {
      return switch (value) {
        case 0 -> OK;
        case 1 -> TIMEOUT;
        default -> CANCELLED;
      };
    }
public static ErrorCode valueOf(int value)