Skip to content

Commit

Permalink
Clarify error message on 404 on REST-API request
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BenediktSeidl committed Jan 23, 2024
1 parent b6aa99b commit 04c3b3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default class RestApiBackend implements Backend {
}
return {
status: 'success',
message: `Data source is working, reached version ${checkMkVersion} of checkmk`,
message: `Data source is working, reached version ${checkMkVersion} of Checkmk`,
title: 'Success',
};
}
Expand Down Expand Up @@ -224,7 +224,7 @@ export default class RestApiBackend implements Backend {
// but we may have a more detailed error message
if (error.status === 404) {
throw new Error(
'REST API graph endpoints are unavailable. Choose correct checkmk version in data source settings.'
'REST API graph endpoint is unavailable. Choose correct Checkmk edition and version in data source settings.'
);
}

Expand Down

0 comments on commit 04c3b3c

Please sign in to comment.