[8.9] [Synthetics] Fix 404 not found monitor view (#163501) (#163534)

# Backport

This will backport the following commits from `main` to `8.9`:
- [[Synthetics] Fix 404 not found monitor view
(#163501)](https://github.com/elastic/kibana/pull/163501)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2023-08-09T16:21:37Z","message":"[Synthetics]
Fix 404 not found monitor view
(#163501)","sha":"9d6ebdda4e630f0973ab6ece2803a878cea09227","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:uptime","v8.10.0","v8.9.1"],"number":163501,"url":"https://github.com/elastic/kibana/pull/163501","mergeCommit":{"message":"[Synthetics]
Fix 404 not found monitor view
(#163501)","sha":"9d6ebdda4e630f0973ab6ece2803a878cea09227"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163501","number":163501,"mergeCommit":{"message":"[Synthetics]
Fix 404 not found monitor view
(#163501)","sha":"9d6ebdda4e630f0973ab6ece2803a878cea09227"}},{"branch":"8.9","label":"v8.9.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
This commit is contained in:
Shahzad 2023-08-10 10:39:45 +02:00 committed by GitHub
parent 86f579d9e3
commit 6c664aeb22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ export const getSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = (libs: U
const encryptedSavedObjectsClient = encryptedSavedObjects.getClient();
return libs.requests.getSyntheticsMonitor({
return await libs.requests.getSyntheticsMonitor({
monitorId,
encryptedSavedObjectsClient,
savedObjectsClient,