Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/contexts/activity-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { backOff } from 'exponential-backoff'
import { useWorkspacesAPI } from './'
import { AvailableApp, AvailableAppsResponse } from './workspaces-context/api.types'
import { AppStatusEvent } from './workspaces-context/websocket-events'
import { openNotificationWithIcon } from '../components'

const BACKOFF_OPTIONS = {
startingDelay: 1,
Expand Down Expand Up @@ -69,7 +70,7 @@ export const ActivityProvider = ({ children }: { children: any }) => {
retry: (e: any, attemptNumber: number) => {
console.error("Failed to load available app specs, retrying...")
if (cancelled) {
console.log("API or login state has changed, cancelling app spec retry...")
openNotificationWithIcon( "error", "Error", "API or login state has changed, cancelling app spec retry...")
// Stop retrying.
return false
}
Expand Down
3 changes: 2 additions & 1 deletion src/contexts/environment-context.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Fragment, createContext, useContext, useEffect, useState } from 'react'
import axios, { CanceledError } from 'axios';
import { openNotificationWithIcon } from '../components';
import {
ActiveView,
AvailableView,
Expand Down Expand Up @@ -114,7 +115,7 @@ export const EnvironmentProvider = ({ children }) => {
</Fragment>
)
} catch (error) {
console.log("Error reading description file, reverting to default values")
openNotificationWithIcon("error","Error", "Error reading description file, reverting to default values")
context.login_text = default_login_text;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/contexts/workspaces-context/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { IWebsocketAPI, WebsocketAPI } from './ws'
import { APIError, IWorkspacesAPI, User, ExtraLink, EnvironmentContext } from './api.types'
import { useEnvironment } from '../'
import { usePageActivity } from '../../hooks'
import { openNotificationWithIcon } from '../../components'

const { Text } = Typography

Expand Down Expand Up @@ -106,7 +107,7 @@ export const WorkspacesAPIProvider = ({ sessionTimeoutWarningSeconds=60, childre
// but this is here just in case.
setUser(null)
} else {
console.log("--- API error encountered ---", "\n", error)
openNotificationWithIcon('error', "--- API error encountered ---\n", error)
}
}, [])

Expand Down