Open AlvaroVega opened 4 months ago
This could be reproduced with a bad update rule with tries something wrong like:
time=2024-07-16T07:35:58.371Z | lvl=INFO | corr=a4152339-c1e5-425b-a631-90131c8da0c6; cbnotif=1; node=00ykkhrocM1721112953-592-00000000114 | trans=1721112953-592-00000000114 | from=172.17.0.1 | srv=smartcity | subsrv=/ | comp=Orion | op=logTracing.cpp[211]:logInfoRequestWithPayload | msg=Request received: POST /v2/op/update, request payload (120 bytes): {"actionType":"append","entities":[{"abnormal":{"value":7,"type":"DateTime"},"id":"thing:disp1_mirror","type":"Alarm"}]}, response code: 400
IMHO this is similar to issue https://github.com/Ficodes/ngsijs/pull/23 but for BadRequest
@fgalan @aarranz Should we open a similar issue to https://github.com/Ficodes/ngsijs/pull/23 for BadRequest details?
@fgalan @aarranz Should we open a similar issue to Ficodes/ngsijs#23 for BadRequest details?
I think it's make sense
The same problem for others error, for example when bachUpdate has received an "InvalidResponse", there is not defails about it:
time=2024-09-18T03:00:00.356Z | lvl=WARN | corr=e937a4f9-4391-4903-946d-43f826293cfc; node=2r6bIQXXEW; perseocep=11893 | trans=1275b7d5-8ae9-4878-8c8a-a3d9b1c9ec39 | op=/actions/do | path=/actions/do | comp=perseo-fe | srv=SSSSSSS | subsrv=/ssssssss | msg=error v2.batchUpdate: {"name":"InvalidResponse","correlator":"CORR; perseocep=11893"} trying update entity
When CB response is 422
time=2024-09-18T03:00:00.355Z | lvl=INFO | corr=CORR perseocep1726583764-195-00000041288 | trans=1726583764-195-00000041288 | from=172.17.0.1 | srv=SSSSSSSSS | subsrv=/sssssss | comp=Orion | op=logTracing.cpp[211]:logInfoRequestWithPayload | msg=Request received: POST /v2/op/update, request payload (816 bytes): {"actionType":"UPDATE","entities":[...........}, response code: 422
related issue: https://github.com/Ficodes/ngsijs/issues/31
This is the log obtained:
Printed by perseo: https://github.com/telefonicaid/perseo-fe/blob/f118a3b8e5f8c2cf1f03079a1852e9bb7b3b0247/lib/models/updateAction.js#L422
Using ngsijs library: https://github.com/aarranz/ngsijs/blob/0627c2beae11f446774d1ab939a8c47307824159/NGSI.js#L424C58-L424C82