Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty details logging BadRequest error retrieved from v2.batchUpdate #788

Open
AlvaroVega opened this issue Jul 16, 2024 · 3 comments
Open

Comments

@AlvaroVega
Copy link
Member

This is the log obtained:

time=2024-07-01T12:45:19.279Z | lvl=WARN | corr=3ba5652f-b266-40a4-a791-1bdcc79c9b2f; cbnotif=24; node=EIBaCtTr-0; perseocep=32465 | trans=0224e923-6d92-4ebe-aec4-262681dac9dc | op=/actions/do | path=/actions/do | comp=perseo-fe | srv=AAAAA | subsrv=/BBBB | msg=error v2.batchUpdate: {"name":"BadRequest","details":"","correlator":"3ba5652f-b266-40a4-a791-1bdcc79c9b2f; cbnotif=24; node=EIBaCtTr-0; perseocep=32465"} trying update entity {"actionType":"append","entities":[{"TimeInstant":{"value":"2024-07-01T12:45:19.175Z","type":"DateTime"}}]} after event {"service":"AAAAAAA","ruleName":"myrule","id":"RRRRRR","TimeInstant":"2024-07-01T12:45:19.175Z","subservice":"/BBBBB","fiwarePerseoContext":{"path":"/actions/do","op":"/actions/do","comp":"perseo-fe","trans":"0224e923-6d92-4ebe-aec4-262681dac9dc","corr":"3ba5652f-b266-40a4-a791-1bdcc79c9b2f; cbnotif=24; node=EIBaCtTr-0; perseocep=32465","srv":"AAAAAA","subsrv":"/BBBB"}}

Printed by perseo:

logger.warn('error v2.batchUpdate: %j trying update entity %j after event %j', error, changes, event);

Using ngsijs library:
https://github.com/aarranz/ngsijs/blob/0627c2beae11f446774d1ab939a8c47307824159/NGSI.js#L424C58-L424C82

@AlvaroVega AlvaroVega changed the title empty details loggin BadRequest error retrieved from v2.batchUpdate empty details logging BadRequest error retrieved from v2.batchUpdate Jul 16, 2024
@AlvaroVega
Copy link
Member Author

AlvaroVega commented Jul 16, 2024

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 Ficodes/ngsijs#23 but for BadRequest

@fgalan @aarranz Should we open a similar issue to Ficodes/ngsijs#23 for BadRequest details?

@fgalan
Copy link
Member

fgalan commented Jul 16, 2024

@fgalan @aarranz Should we open a similar issue to Ficodes/ngsijs#23 for BadRequest details?

I think it's make sense

@AlvaroVega
Copy link
Member Author

AlvaroVega commented Sep 19, 2024

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: Ficodes/ngsijs#31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants