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
Feat: Switching HTTP request library for FetchIAPToken (#1699)
Switches HTTP request library from HttpClient to HttpURLConnection.
Improves error message handling
Login error with no IAP credentials provided.
```
Please check your Looker API client_id and client_secret.
Underlying Error: POST /api/4.0/login error_body:
```
Login error with IAP credentials provided
```
Please ensure your Identity-Aware Proxy credentials and your Looker credentials are correct
Proxy layer OR at Looker's internal API layer.
Underlying Error: POST /api/4.0/login error_body:
```
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
val params =mapOf(client_id to clientId, client_secret to clientSecret)
239
252
val body =UrlEncodedContent(params)
240
253
241
-
val iapToken = fetchIapToken()
242
-
243
254
try {
255
+
val iapToken = fetchIapToken()
256
+
244
257
val token = ok<AuthToken>(
245
258
transport.request<AuthToken>(
246
259
HttpMethod.POST,
@@ -256,15 +269,26 @@ open class AuthSession(
256
269
},
257
270
)
258
271
authToken = token
259
-
} catch (e:Exception) {
260
-
val isUsingIap =!config["iap_client_id"].isNullOrBlank() ||!config["iap_service_account_email"].isNullOrBlank()
261
-
262
-
val errorMessage =if (isUsingIap) {
263
-
"Authentication failed during login. \nPlease check your iap_client_id and iap_service_account_email fields, as well as your Looker credentials.\nDetails: ${e.message}"
0 commit comments