@@ -75,7 +75,21 @@ export const createConnectionThunk =
75
75
// eslint-disable-next-line no-console
76
76
console . log ( 'Confirming connection was established...' ) ;
77
77
if ( records && records [ 0 ] && records [ 0 ] . error ) {
78
- dispatch ( createNotificationThunk ( 'Unable to establish connection' , records [ 0 ] . error ) ) ;
78
+ if (
79
+ records [ 0 ] . error . startsWith ( 'The client is unauthorized due to authentication failure' ) ||
80
+ records [ 0 ] . error . startsWith (
81
+ 'The client has provided incorrect authentication details too many times in a row.'
82
+ )
83
+ ) {
84
+ dispatch (
85
+ createNotificationThunk (
86
+ 'Something went wrong!' ,
87
+ 'We are working on it. You can try to reload without cache.'
88
+ )
89
+ ) ;
90
+ } else {
91
+ dispatch ( createNotificationThunk ( 'Unable to establish connection' , records [ 0 ] . error ) ) ;
92
+ }
79
93
if ( loggingSettings . loggingMode > '0' ) {
80
94
dispatch (
81
95
createLogThunk (
@@ -93,6 +107,7 @@ export const createConnectionThunk =
93
107
) ;
94
108
}
95
109
} else if ( records && records [ 0 ] && records [ 0 ] . keys [ 0 ] == 'connected' ) {
110
+ dispatch ( clearNotification ( ) ) ;
96
111
dispatch ( setConnectionProperties ( protocol , url , port , database , username , password ) ) ;
97
112
dispatch ( setConnectionModalOpen ( false ) ) ;
98
113
dispatch ( setConnected ( true ) ) ;
@@ -170,7 +185,7 @@ export const createConnectionThunk =
170
185
query ,
171
186
parameters ,
172
187
1 ,
173
- ( ) => { } ,
188
+ ( ) => { } ,
174
189
( records ) => validateConnection ( records )
175
190
) ;
176
191
} catch ( e ) {
@@ -420,7 +435,7 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState:
420
435
standaloneUsername : '' ,
421
436
standalonePassword : '' ,
422
437
skipConfirmation : false ,
423
- skipAddDashErrorPopup : false
438
+ skipAddDashErrorPopup : false ,
424
439
} ;
425
440
try {
426
441
config = await ( await fetch ( 'config.json' ) ) . json ( ) ;
0 commit comments