Skip to content

Conversation

@calavera
Copy link
Contributor

Handle HTTP status codes coming from the runtime server
in a way that plays nice with local development tools
like the runtime interface emulator.

Signed-off-by: David Calavera david.calavera@gmail.com

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

Handle HTTP status codes coming from the runtime server
in a way that plays nice with local development tools
like the runtime interface emulator.

Signed-off-by: David Calavera <david.calavera@gmail.com>
let event = next_event_response?;
let (parts, body) = event.into_parts();

if parts.status == http::StatusCode::NO_CONTENT {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can an AWS server return this status? If not, should this be under an optional flag or for debug only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why should we complicate it more than this?

Signed-off-by: David Calavera <david.calavera@gmail.com>
Copy link
Contributor

@nmoutschen nmoutschen left a comment

Choose a reason for hiding this comment

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

LGTM!

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