@@ -95,8 +95,8 @@ export async function getEnvironments(): Promise<Environment[]> {
9595return response . data . data || [ ] ;
9696} catch ( error ) {
9797const errorMessage =
98- error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchEnvironments" ) ;
99- messageInstance . error ( errorMessage ) ;
98+ error && error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchEnvironments" ) ;
99+ console . error ( errorMessage ) ;
100100throw error ;
101101}
102102}
@@ -150,7 +150,7 @@ export async function getEnvironmentById(id: string): Promise<Environment> {
150150} catch ( error ) {
151151const errorMessage =
152152error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchEnvironment" ) ;
153- messageInstance . error ( errorMessage ) ;
153+ console . error ( errorMessage ) ;
154154throw error ;
155155}
156156}
@@ -223,7 +223,7 @@ export async function getEnvironmentWorkspaces(
223223// Handle and transform error
224224const errorMessage =
225225error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchWorkspaces" ) ;
226- messageInstance . error ( errorMessage ) ;
226+ console . error ( errorMessage ) ;
227227throw error ;
228228}
229229}
@@ -273,7 +273,7 @@ export async function getEnvironmentUserGroups(
273273} catch ( error ) {
274274// Handle and transform error
275275const errorMessage = error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchUserGroups" ) ;
276- messageInstance . error ( errorMessage ) ;
276+ console . error ( errorMessage ) ;
277277throw error ;
278278}
279279}
@@ -383,7 +383,7 @@ export async function getWorkspaceApps(
383383} catch ( error ) {
384384// Handle and transform error
385385const errorMessage = error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchWorkspaceApps" ) ;
386- messageInstance . error ( errorMessage ) ;
386+ console . error ( errorMessage ) ;
387387throw error ;
388388}
389389}
@@ -441,7 +441,7 @@ export async function getWorkspaceDataSources(
441441} catch ( error ) {
442442// Handle and transform error
443443const errorMessage = error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchWorkspaceDataSources" ) ;
444- messageInstance . error ( errorMessage ) ;
444+ console . error ( errorMessage ) ;
445445throw error ;
446446}
447447}
@@ -523,7 +523,7 @@ export async function getWorkspaceQueries(
523523} catch ( error ) {
524524// Handle and transform error
525525const errorMessage = error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchWorkspaceQueries" ) ;
526- messageInstance . error ( errorMessage ) ;
526+ console . error ( errorMessage ) ;
527527throw error ;
528528}
529529}
@@ -575,7 +575,7 @@ export async function getEnvironmentsWithLicenseStatus(): Promise<Environment[]>
575575} catch ( error ) {
576576const errorMessage =
577577error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchEnvironments" ) ;
578- messageInstance . error ( errorMessage ) ;
578+ console . error ( errorMessage ) ;
579579throw error ;
580580}
581581}
@@ -618,7 +618,7 @@ export async function getEnvironmentDeploymentId(
618618} catch ( error ) {
619619// Handle and transform error
620620const errorMessage = error instanceof Error ?error . message :trans ( "environments.services_environments_failedToFetchDeploymentId" ) ;
621- messageInstance . error ( errorMessage ) ;
621+ console . error ( errorMessage ) ;
622622throw error ;
623623}
624624}