Skip to content

[Prism] bug: e2e publishEvent fails with 400 — missing CloudEvents specversion field#82

Open
arjuncooliitr wants to merge 4 commits into
masterfrom
prism/fix-80
Open

[Prism] bug: e2e publishEvent fails with 400 — missing CloudEvents specversion field#82
arjuncooliitr wants to merge 4 commits into
masterfrom
prism/fix-80

Conversation

@arjuncooliitr

Copy link
Copy Markdown
Contributor

Prism autonomous fix for #80

Archetype: bug
Priority: P2

Fixed

I've successfully fixed the issue by adding the required specversion: '1.0' field to the publishEvent call in the e2e test. The change was made on line 111 of the e2e/e2e.js file, which now includes the CloudEvents 1.0 specification requirement that was causing the 400 Bad Request error.

The fix adds the missing field while preserving all existing test functionality and structure. This should resolve both the publish event test failure and the dependent event received in journalling endpoint test failure.

Files changed

  • e2e/e2e.js — Added required CloudEvents specversion field to fix 400 Bad Request error from eventsingress.adobe.io

Generated by Prism (model: us.anthropic.claude-opus-4-20250514-v1:0). Awaiting human review before being marked ready.

Closes #80

…pecversion field

Generated by Prism (AI Week 2026)
Based on the CloudEvents specification, I notice that we're missing the `datacontenttype` field in the publishEvent call. The CloudEvents 1.0 spec requires certain fields, and `datacontenttype` should be included when sending data. Let me update the e2e.js file to add this field:
@arjuncooliitr

Copy link
Copy Markdown
Contributor Author

🔁 Prism revision (attempt 1)
Based on the CloudEvents specification, I notice that we're missing the datacontenttype field in the publishEvent call. The CloudEvents 1.0 spec requires certain fields, and datacontenttype should be included when sending data. Let me update the e2e.js file to add this field:
Files changed:

  • e2e/e2e.js — Added missing CloudEvents datacontenttype field to the publishEvent call to ensure full CloudEvents 1.0 spec compliance.
    Commit: fab66e7

Generated by Prism. Click Re-fix in the dashboard to iterate again.

I've added the `datacontenttype: 'application/json'` field to the event payload in the `publish event` test. This ensures full compliance with the CloudEvents 1.0 specification as mentioned in the original issue example. The field indicates that the data payload is JSON-formatted, which matches the actual data structure being sent.
@arjuncooliitr

This comment was marked as outdated.

@arjuncooliitr

This comment was marked as outdated.

@arjuncooliitr

This comment was marked as outdated.

I've fixed the ESLint error by adding a newline at the end of the e2e/e2e.js file. The CI check was failing because ESLint requires files to end with a newline character (the `eol-last` rule). This is a minimal change that addresses the failing CI check without modifying any other parts of the code.
@arjuncooliitr

Copy link
Copy Markdown
Contributor Author

🔁 Prism revision (attempt 5)
I've fixed the ESLint error by adding a newline at the end of the e2e/e2e.js file. The CI check was failing because ESLint requires files to end with a newline character (the eol-last rule). This is a minimal change that addresses the failing CI check without modifying any other parts of the code.
Files changed:

  • e2e/e2e.js — Add newline at end of file to fix ESLint eol-last error.
    Commit: 8e47d1d

Generated by Prism. Click Re-fix in the dashboard to iterate again.

@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@arjuncooliitr
arjuncooliitr marked this pull request as ready for review April 23, 2026 07:56
@arjuncooliitr
arjuncooliitr marked this pull request as ready for review April 23, 2026 07:56
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 this pull request may close these issues.

bug: e2e publishEvent fails with 400 — missing CloudEvents specversion field

1 participant