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

Fetch function doesn't break on non 200 response from API #14

Closed
bitonio opened this issue Nov 2, 2023 · 1 comment · Fixed by #16
Closed

Fetch function doesn't break on non 200 response from API #14

bitonio opened this issue Nov 2, 2023 · 1 comment · Fixed by #16
Assignees
Labels
bug Something isn't working

Comments

@bitonio
Copy link
Collaborator

bitonio commented Nov 2, 2023

root@localhost:~# docker logs root-etp-threat-1
2023-11-02 16:47:00,476 ULS E UlsInputCli - CLI process [8] was found stale - Reason:  "2023-11-02 16:47:00,428 cli-etp MainThread E API call failed with HTTP/400: b'{\n  "type": "https://problems.luna.akamaiapis.net/-/pep-authn/request-error",\n  "title": "Bad request",\n  "status": 400,\n  "detail": "Invalid timestamp",\n  "instance": "https://akab-xxxx-sisx74boynnyo35c.luna.akamaiapis.net/etp-report/v3/configs/xxxx/dns-activities/details?accountSwitchKey=xxxxx",\n  "method": "POST",\n  "serverIp": "x.37.60.14",\n  "clientIp": "x.162.171.151",\n  "requestId": "24425543",\n  "requestTime": "2023-11-02T16:47:00Z"\n}\n'
Traceback (most recent call last):
File "/opt/akamai-uls/uls/ext/cli-etp/bin/akamai-etp", line 738, in <module>
main()
File "/opt/akamai-uls/uls/ext/cli-etp/bin/akamai-etp", line 669, in main
fetch_events_concurrent(config, out)
File "/opt/akamai-uls/uls/ext/cli-etp/bin/akamai-etp", line 376, in fetch_events_concurrent
fetch_event_page(start, end, 1, concurrent_fetch, pool_futures, stats, output)
File "/opt/akamai-uls/uls/ext/cli-etp/bin/akamai-etp", line 304, in fetch_event_page
total_records = response_data["pageInfo"]["totalRecords"]
~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'pageInfo'
"
@bitonio bitonio self-assigned this Nov 2, 2023
@bitonio bitonio added the bug Something isn't working label Nov 2, 2023
@MikeSchiessl
Copy link
Collaborator

pushing this topic up

bitonio added a commit that referenced this issue Mar 5, 2024
…#14

For event fetching, --limit can be set with CLIETP_FETCH_LIMIT environment variable #12
Update OSS header to 2024
Bump version to 0.4.6
@bitonio bitonio linked a pull request Mar 5, 2024 that will close this issue
bitonio added a commit that referenced this issue Mar 5, 2024
…#14 (#16)

For event fetching, --limit can be set with CLIETP_FETCH_LIMIT environment variable #12
Update OSS header to 2024
Bump version to 0.4.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants