For `POST _license/start_basic` the API, the system decides whether a new basic license should be generated using the following logic:

https://github.com/elastic/elasticsearch/blob/3c15e4ebb1ae045d5cc690a0fd1e2f3c73173d39/x-pack/plugin/core/src/main/java/org/elasticsearch/license/StartBasicClusterTask.java#L101-L106

However, when building the response, the logic only takes account into old license type without checking maxNodes and expiryDate:

https://github.com/elastic/elasticsearch/blob/3c15e4ebb1ae045d5cc690a0fd1e2f3c73173d39/x-pack/plugin/core/src/main/java/org/elasticsearch/license/StartBasicClusterTask.java#L64-L65

This means it is possible that client gets an error response of 
```json
{
  "acknowledged": true,
  "basic_was_started": false,
  "error_message": "Operation failed: Current license is basic."
}
```
while the license is actually generated successfully at the backend. 

See also: https://github.com/elastic/elasticsearch/pull/85993#discussion_r859356499
x-pack/plugin/core/src/main/java/org/elasticsearch/license/StartBasicClusterTask.java
@Override
    public void clusterStateProcessed(ClusterState oldState, ClusterState newState) {
        assert false : "never called";
    }
    public LicensesMetadata execute(
        LicensesMetadata currentLicensesMetadata,
        DiscoveryNodes discoveryNodes,
        ClusterStateTaskExecutor.TaskContext<StartBasicClusterTask> taskContext
    ) throws Exception {
        assert taskContext.getTask() == this;
        final var listener = ActionListener.runBefore(
            this.listener,
            () -> logger.debug("license prior to starting basic license: {}", currentLicensesMetadata)
        );
        License currentLicense = LicensesMetadata.extractLicense(currentLicensesMetadata);
        final LicensesMetadata updatedLicensesMetadata;
        if (shouldGenerateNewBasicLicense(currentLicense)) {
            License selfGeneratedLicense = generateBasicLicense(discoveryNodes);
            if (request.isAcknowledged() == false && currentLicense != null) {
                Map<String, String[]> ackMessageMap = LicenseService.getAckMessages(selfGeneratedLicense, currentLicense);
                if (ackMessageMap.isEmpty() == false) {
                    taskContext.success(
                        listener.delegateFailure(
                            (delegate, ignored) -> delegate.onResponse(
                                new PostStartBasicResponse(
                                    PostStartBasicResponse.Status.NEED_ACKNOWLEDGEMENT,
                                    ackMessageMap,
                                    ACKNOWLEDGEMENT_HEADER
                                )
                            )