-
Notifications
You must be signed in to change notification settings - Fork 12
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: infinite TTLs are not supported anymore, forward ttl=0 #170
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #170 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 247 251 +4
Branches 42 43 +1
=========================================
+ Hits 247 251 +4 ☔ View full report in Codecov by Sentry. |
sdkDetails: { key, valueLength: value.length, options, errors } | ||
})) | ||
} | ||
if (ttl !== undefined && (ttl < 0 || ttl > MAX_TTL_SECONDS)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too bad AJV validator can't have a min max :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes AJV has a min max, but the error message is not nice...
AioCoreSDKError [AdobeStateLibError]: [AdobeStateLib:ERROR_BAD_ARGUMENT] WARNING: keyword 'minimum' was not handled for formatting: {
"instancePath": "/ttl",
"schemaPath": "#/properties/ttl/minimum",
"keyword": "minimum",
"params": {
"comparison": ">=",
"limit": 0
},
"message": "must be >= 0"
}
I wanted to make it clear that infinite ttls are not supported anymore!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we can add the support in our code here, but maybe for next time:
Line 63 in 94e34ad
function formatAjvErrors (errors) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great maybe next time, as this is a custom error anyways
a6c3b83
to
7a4e065
Compare
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: