This changes use getStringFieldF(subOrig, CSUB_LASTFAILUREASON); and getIntOrLongFieldAsLongF(subOrig, CSUB_LASTSUCCESSCODE); without checking if this filed exist. So when string field is not exist, function getStringFieldF logs error and return "" empty string.
When subscription is updated, error is logged.
This error log is caused by https://github.com/telefonicaid/fiware-orion/pull/3414
This changes use
getStringFieldF(subOrig, CSUB_LASTFAILUREASON);
andgetIntOrLongFieldAsLongF(subOrig, CSUB_LASTSUCCESSCODE);
without checking if this filed exist. So when string field is not exist, function getStringFieldF logs error and return""
empty string.File:
mongoUpdateSubscription.cpp
Functions:setLastFailure@546
,setLastSuccess@570
Request: PATCH v2/subscriptions/5d42ae11b1c943eb7f5b62c5?options=skipInitialNotification
{ "id": "5d42ae11b1c943eb7f5b62c5", "subject": { "entities": [ { "idPattern": ".*", "type": "Output" } ] }, "notification": { "http": { "url": "http://192.168.1.1:6060/orion" }, "attrsFormat": "legacy" }, "expires": "2019-08-01T09:31:07.617815Z" }
Response: