Skip to content

Conversation

@pawels-optimizely
Copy link
Contributor

@pawels-optimizely pawels-optimizely commented Jan 17, 2020

Summary

Assigning error to a predefined error variable when CDN returns 403 response helps consumers such as sidedoor. Currently these consumers have to search the error message string for the text "403", which is not really convenient.

const DatafileURLTemplate = "https://cdn.optimizely.com/datafiles/%s.json"

// Err403Forbidden is 403Forbidden specific error
var Err403Forbidden = errors.New("unable to fetch fresh datafile, reason (http status code): 403 Forbidden")
Copy link
Contributor

@aliabbasrizvi aliabbasrizvi Jan 17, 2020

Choose a reason for hiding this comment

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

It will be good to mention that people confirm their SDK key again.

On most occasions the 403 error will happen from people providing inaccurate SDK key.

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

Please include a PR summary with this PR. Otherwise looks good

@pawels-optimizely pawels-optimizely merged commit 8e1c24b into master Jan 17, 2020
@pawels-optimizely pawels-optimizely deleted the pawel/OASIS-5817 branch January 17, 2020 20:06
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