@@ -78,11 +78,13 @@ const ERROR_DESCRIPTION_MAP: { readonly [key in ErrorCode]: string } = {
7878 [ ErrorCode . CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS ] :
7979 'Setting more than {$maxSignals} custom signals is not supported.' ,
8080 [ ErrorCode . CONFIG_UPDATE_STREAM_ERROR ] :
81- 'The stream was not able to connect to the backend.' ,
82- [ ErrorCode . CONFIG_UPDATE_UNAVAILABLE ] : 'The Realtime service is unavailable.' ,
81+ 'The stream was not able to connect to the backend: {$originalErrorMessage}.' ,
82+ [ ErrorCode . CONFIG_UPDATE_UNAVAILABLE ] :
83+ 'The Realtime service is unavailable: {$originalErrorMessage}' ,
8384 [ ErrorCode . CONFIG_UPDATE_MESSAGE_INVALID ] :
84- 'The stream invalidation message was unparsable.' ,
85- [ ErrorCode . CONFIG_UPDATE_NOT_FETCHED ] : 'Unable to fetch the latest config.'
85+ 'The stream invalidation message was unparsable: {$originalErrorMessage}' ,
86+ [ ErrorCode . CONFIG_UPDATE_NOT_FETCHED ] :
87+ 'Unable to fetch the latest config: {$originalErrorMessage}'
8688} ;
8789
8890// Note this is effectively a type system binding a code to params. This approach overlaps with the
@@ -102,10 +104,7 @@ interface ErrorParams {
102104 [ ErrorCode . FETCH_PARSE ] : { originalErrorMessage : string } ;
103105 [ ErrorCode . FETCH_STATUS ] : { httpStatus : number } ;
104106 [ ErrorCode . CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS ] : { maxSignals : number } ;
105- [ ErrorCode . CONFIG_UPDATE_STREAM_ERROR ] : {
106- httpStatus ?: number ;
107- originalErrorMessage ?: string ;
108- } ;
107+ [ ErrorCode . CONFIG_UPDATE_STREAM_ERROR ] : { originalErrorMessage ?: string } ;
109108 [ ErrorCode . CONFIG_UPDATE_UNAVAILABLE ] : { originalErrorMessage : string } ;
110109 [ ErrorCode . CONFIG_UPDATE_MESSAGE_INVALID ] : { originalErrorMessage : string } ;
111110 [ ErrorCode . CONFIG_UPDATE_NOT_FETCHED ] : { originalErrorMessage : string } ;
0 commit comments