diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 05feb0873..6949f2d49 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,2 +1,3 @@ - Fix: allow send multiple measures to CB in a batch (POST /v2/op/update) and sorted by TimeInstant when possible, instead of using multiples single request (iotagent-json#825, #1612) - Fix: default express limit to 1Mb instead default 100Kb and allow change it throught a conf env var 'IOTA_EXPRESS_LIMIT' (iotagent-json#827) +- Fix: accept 201 status code from context broker with NGSI-LD interface when first measure is sent and device is created in it (#1617) diff --git a/lib/services/ngsi/entities-NGSI-LD.js b/lib/services/ngsi/entities-NGSI-LD.js index be8512905..5b6232574 100644 --- a/lib/services/ngsi/entities-NGSI-LD.js +++ b/lib/services/ngsi/entities-NGSI-LD.js @@ -341,7 +341,7 @@ function generateNGSILDOperationHandler(operationName, entityName, typeInformati } else if ( response && operationName === 'update' && - (response.statusCode === 200 || response.statusCode === 204) + (response.statusCode === 200 || response.statusCode === 204 || response.statusCode === 201) ) { logger.info(context, 'Received the following response from the CB: Value updated successfully\n'); alarms.release(constants.ORION_ALARM);