FIWARE / context.Orion-LD

Context Broker and CEF building block for context data management which supports both the NGSI-LD and the NGSI-v2 APIs
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf
GNU Affero General Public License v3.0
50 stars 43 forks source link

Error when updating attributes from non-existing entities in forwarding mode #1556

Closed ravaga closed 5 months ago

ravaga commented 7 months ago

When trying to update some attributes of a non-existing entity using the HTTP PATCH method and the /ngsi-ld/v1/entities/{entityId}/attrs/ URL path, the broker crashes instead returning an HTTP 404 Not found.

Just to clarify, we are not trying to update non-existing entities, but we came across this bug by mistake because we forgot to previously create the entities that we wanted to update.

The bug occurs both in a scenario with 3 federated Orion-LD instances with some entities in all the brokers, and in a single Orion-LD instance without any entity (the request was performed some seconds after the broker started).

ravaga commented 7 months ago

Perhaps related to #1467

ravaga commented 5 months ago

Closing as using the PATCH /ngsi-ld/v1/entities/{entityId}/attrs/ request is not recommended and it'll be deprecated in future releases.