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

Bitbucket Webhook Fails to Handle Payload - Missing Field 'data' #1356

Closed
rohanbalkondekar opened this issue Nov 13, 2024 · 2 comments · Fixed by #1359
Closed

Bitbucket Webhook Fails to Handle Payload - Missing Field 'data' #1356

rohanbalkondekar opened this issue Nov 13, 2024 · 2 comments · Fixed by #1359

Comments

@rohanbalkondekar
Copy link

The Bitbucket integration fails to handle incoming webhook payloads, as observed in logs where the error Failed to handle webhook: 'data' occurs in bitbucket_app.py. Specifically:

Error Location: line 210 in bitbucket_app.py.
Issue Details: The payload structure from Bitbucket does not match the fields expected by bitbucket_app.py. The is_bot_user function also fails to validate the payload due to incorrect assumptions about the payload’s structure or missing fields.

{"text": "Failed 'is_bot_user' logic: {e}\n", "record": {"elapsed": {"repr": "0:10:44.164716", "seconds": 644.164716}, "exception": null, "extra": {}, "file": {"name": "bitbucket_app.py", "path": "/app/pr_agent/servers/bitbucket_app.py"}, "function": "is_bot_user", "level": {"icon": "❌", "name": "ERROR", "no": 40}, "line": 105, "message": "Failed 'is_bot_user' logic: {e}", "module": "bitbucket_app", "name": "__main__", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 140474326748032, "name": "MainThread"}, "time": {"repr": "2024-11-13 13:22:49.564744+00:00", "timestamp": 1731504169.564744}}}
{"text": "Failed to handle webhook: 'data'\n", "record": {"elapsed": {"repr": "0:10:44.164836", "seconds": 644.164836}, "exception": null, "extra": {}, "file": {"name": "bitbucket_app.py", "path": "/app/pr_agent/servers/bitbucket_app.py"}, "function": "inner", "level": {"icon": "❌", "name": "ERROR", "no": 40}, "line": 210, "message": "Failed to handle webhook: 'data'", "module": "bitbucket_app", "name": "__main__", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 140474326748032, "name": "MainThread"}, "time": {"repr": "2024-11-13 13:22:49.564864+00:00", "timestamp": 1731504169.564864}}}
@mrT23
Copy link
Collaborator

mrT23 commented Nov 14, 2024

thanks, addressed in #1359

@rohanbalkondekar
Copy link
Author

thanks, addressed in #1359

Hi @mrT23! Thanks for the fix.

But I think this fix has caused another issue #1360
Would really appreciate if you look into this and get back.

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

Successfully merging a pull request may close this issue.

2 participants