File tree Expand file tree Collapse file tree
packages/unraid-api-plugin-connect/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ export class CloudResolver {
2727 const minigraphql = this . cloudService . checkMothershipClient ( ) ;
2828 const cloud = await this . cloudService . checkCloudConnection ( ) ;
2929
30+ const cloudError = cloud . error ? `NETWORK: ${ cloud . error } ` : '' ;
31+ const miniGraphError = minigraphql . error ? `CLOUD: ${ minigraphql . error } ` : '' ;
32+
33+ let error = cloudError || miniGraphError || undefined ;
34+ if ( cloudError && miniGraphError ) {
35+ error = `${ cloudError } \n${ miniGraphError } ` ;
36+ }
37+
3038 return {
3139 relay : {
3240 // Left in for UPC backwards compat.
@@ -38,10 +46,7 @@ export class CloudResolver {
3846 minigraphql,
3947 cloud,
4048 allowedOrigins : this . networkService . getAllowedOrigins ( ) ,
41- error :
42- `${
43- cloud . error ? `NETWORK: ${ cloud . error } ` : ''
44- } \n${ minigraphql . error ? `CLOUD: ${ minigraphql . error } ` : '' } ` || undefined ,
49+ error,
4550 } ;
4651 }
4752}
Original file line number Diff line number Diff line change @@ -166,7 +166,11 @@ export class CloudService {
166166 try {
167167 ip = await this . checkDns ( ) ;
168168 } catch ( error ) {
169- this . logger . warn ( 'Failed to fetch DNS, but Minigraph is connected - continuing' ) ;
169+ this . logger . warn (
170+ 'Failed to fetch DNS, but Minigraph is connected - continuing. Error type: %s' ,
171+ typeof error
172+ ) ;
173+ this . logger . error ( error ) ;
170174 ip = `ERROR: ${ error instanceof Error ? error . message : 'Unknown Error' } ` ;
171175 // Clear error since we're actually connected to the cloud.
172176 // Do not populate the ip cache since we're in a weird state (this is a change from the previous behavior).
You can’t perform that action at this time.
0 commit comments