Skip to content

Commit 04c3b3c

Browse files
committed
Clarify error message on 404 on REST-API request
We assumed that this can only happen if you query a Checkmk version that has no graph query endpoints at all. But the enterprise REST-API endpoint will return a 404 error in Checkmk raw edition, so we adapted the hint for the user. Unrelated fix: Checkmk should start with capital letter.
1 parent b6aa99b commit 04c3b3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/rest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export default class RestApiBackend implements Backend {
195195
}
196196
return {
197197
status: 'success',
198-
message: `Data source is working, reached version ${checkMkVersion} of checkmk`,
198+
message: `Data source is working, reached version ${checkMkVersion} of Checkmk`,
199199
title: 'Success',
200200
};
201201
}
@@ -224,7 +224,7 @@ export default class RestApiBackend implements Backend {
224224
// but we may have a more detailed error message
225225
if (error.status === 404) {
226226
throw new Error(
227-
'REST API graph endpoints are unavailable. Choose correct checkmk version in data source settings.'
227+
'REST API graph endpoint is unavailable. Choose correct Checkmk edition and version in data source settings.'
228228
);
229229
}
230230

0 commit comments

Comments
 (0)