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

making originating origin header optional in unpack request functions #25

Merged
merged 1 commit into from
Mar 10, 2018

Conversation

shawn-hurley
Copy link
Contributor

  • platforms are not guaranteed to send this header
  • logging error so that if a user is expecting the header they can still see what is wrong

* platforms are not guaranteed to send this header.
if err != nil {
return nil, err
glog.Infof("Unable to retrieve originating identity - %v", err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This just seems to sort of duplicate the error msg, I would just log the error msg instead, see:

I0308 14:54:32.912222       1 apisurface.go:126] Unable to retrieve originating identity - unable to find originating identity

Copy link
Contributor

Choose a reason for hiding this comment

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

retrieveOriginatingIdentity can return 2 different errors, I don't see a problem with the log. It is duplicated under one instance, but not another. And if someone ever changes the method to return a different error it might be harder to track down. So the duplicate message doesn't bother me.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jmrodri Fair point, better to duplicate then to having to track down where the error originated.

@jmrodri
Copy link
Contributor

jmrodri commented Mar 9, 2018

LGTM

Copy link
Collaborator

@lilic lilic left a comment

Choose a reason for hiding this comment

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

lgtm

@lilic lilic merged commit 34c1336 into pmorie:master Mar 10, 2018
@carolynvs
Copy link
Collaborator

Thank you for this fix! 💯

jboyd01 pushed a commit to jboyd01/osb-broker-lib that referenced this pull request Apr 17, 2018
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.

4 participants