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

Add requestId in error response #40

Merged
merged 1 commit into from
Jun 16, 2021
Merged

Add requestId in error response #40

merged 1 commit into from
Jun 16, 2021

Conversation

preearor
Copy link
Contributor

@preearor preearor commented Jun 11, 2021

  • Add request Id in error response

Customer can search for requestId in LogResults, and cloudwatch but getting it returned in error response relieve their pain for searching

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@preearor preearor changed the title Addd requestId in error response Add requestId in error response Jun 11, 2021
Comment on lines +1012 to +1016
frame_type = int.from_bytes(content[:4], "big")
self.assertEqual(frame_type, 0xA55A0001)

length = int.from_bytes(content[4:8], "big")
self.assertEqual(length, len(expected_logged_error))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there are separate tests to ensure the framing is correct, these assertions are redundant here

result = {
"errorMessage": error_message if error_message else "",
"errorType": error_type if error_type else "",
"requestId": invoke_id if invoke_id is not None else "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this can be simplified:

 "requestId": invoke_id if invoke_id else "",

@preearor preearor merged commit bc8170a into aws:main Jun 16, 2021
@preearor preearor added the semver-minor Requires a minor semantic versioning bump label Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Requires a minor semantic versioning bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants