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

Fix response codes for container metadata and task metadata requests #2643

Merged
merged 1 commit into from
Sep 19, 2020

Conversation

mythri-garaga
Copy link
Contributor

Summary

Fix response codes for container metadata and task metadata requests in v3 and v4.
For example: If container's network metadata is unavailable, we should return 5xx instead of 400(Bad Request) response code

Implementation details

This PR includes following changes to agent/handlers

  • In /utils- added errors.go to have a Transient error type
  • In /v3 and /v4 - added logging and fixed response code for container and task metadatahandler request

Testing

Manually tested the changes to see if we are 500 response code is returned when container network settings is nil by commenting out

container.SetNetworkSettings(metadata.NetworkSettings)
.

New tests cover the changes: no

Description for the changelog

Bug - Fix response code when container network metadata is unavailable in TMDE

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mythri-garaga mythri-garaga merged commit d8bdab7 into aws:dev Sep 19, 2020
@sparrc sparrc added this to the 1.45.0 milestone Sep 28, 2020
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.

5 participants