You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Reporting a Vulnerability](#reporting-a-vulnerability)
44
45
@@ -2142,6 +2143,130 @@ Notes:
2142
2143
- The `time_to_live` (TTL) value should be specified in seconds.
2143
2144
- By default, the TTL value is set to 60 seconds.
2144
2145
2146
+
#### Bearer token expiry edge case
2147
+
When you use bearer tokens for authentication and API requests in SDKs, there's the potential for a token to expire after the token is verified as valid but before the actual API call is made, causing the request to fail unexpectedly due to the token's expiration. An error from this edge case would look something like this:
2148
+
2149
+
```txt
2150
+
message: Authentication failed. Bearer token is expired. Use a valid bearer token. See https://docs.skyflow.com/api-authentication/
2151
+
```
2152
+
2153
+
If you encounter this kind of error, retry the request. During the retry, the SDK detects that the previous bearer token has expired and generates a new one for the current and subsequent requests.
The SDK provides logging using python's inbuilt `logging` library. By default the logging level of the SDK is set to `LogLevel.ERROR`. This can be changed by using `set_log_level(log_level)` as shown below:
0 commit comments