File tree 1 file changed +6
-8
lines changed
grafana-plugin/src/containers/PluginConfigPage
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export const PluginConfigPage = (props: Props) => {
68
68
provisioningConfig = await makeRequest ( '/plugin/self-hosted/install' , { method : 'POST' } ) ;
69
69
} catch ( e ) {
70
70
if ( e . response . status === 502 ) {
71
- console . warn ( 'Could not connect to OnCall: ' + plugin . meta . jsonData . onCallApiUrl ) ;
71
+ console . warn ( 'Could not connect to OnCall: ' + onCallApiUrl ) ;
72
72
} else if ( e . response . status === 403 ) {
73
73
console . warn ( 'Invitation token is invalid or expired.' ) ;
74
74
} else {
@@ -130,13 +130,11 @@ export const PluginConfigPage = (props: Props) => {
130
130
131
131
const handleSyncException = useCallback ( ( e ) => {
132
132
if ( plugin . meta . jsonData ?. onCallApiUrl ) {
133
- setPluginStatusMessage (
134
- 'Tried connecting to OnCall: ' +
135
- plugin . meta . jsonData . onCallApiUrl +
136
- '\n' +
137
- e +
138
- ', retry or check settings & re-initialize.'
139
- ) ;
133
+ let statusMessage = plugin . meta . jsonData . onCallApiUrl + '\n' + e + ', retry or check settings & re-initialize.' ;
134
+ if ( e . response . status == 404 ) {
135
+ statusMessage += '\nIf Grafana OnCall was just installed, restart Grafana for OnCall routes to be available.' ;
136
+ }
137
+ setPluginStatusMessage ( statusMessage ) ;
140
138
setRetrySync ( true ) ;
141
139
} else {
142
140
setPluginStatusMessage ( 'OnCall has not been setup, configure & initialize below.' ) ;
You can’t perform that action at this time.
0 commit comments