Skip to content

Conversation

@keithmacaulay
Copy link
Contributor

@keithmacaulay keithmacaulay commented Nov 15, 2024

Updating to Benchling SDK v1.21.1 which fixes the issue with request.headers needing to be a dict.

More info on the SDK update here.

# Important! To verify webhooks, we need to pass the body as an unmodified string
# Flask's request.data is bytes, so decode to string. Passing bytes or JSON won't work
verify(app_def_id, request.data.decode("utf-8"), request.headers) # type: ignore[arg-type]
verify(app_def_id, request.data.decode("utf-8"), request.headers)
Copy link
Contributor

Choose a reason for hiding this comment

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

niceee 😄

@damola-benchling damola-benchling changed the title revert type checking workaround for request.headers Use updated CanvasBuilder, revert type checking workaround for verify Nov 19, 2024
@damola-benchling damola-benchling merged commit 9845c26 into benchling:main Nov 19, 2024
2 checks passed
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.

3 participants