You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[8.19] [dashboard] fix invalid dashboard displayed as 404 instead of showing validation error (#211661) (#220427)
# Backport
This will backport the following commits from `main` to `8.19`:
- [[dashboard] fix invalid dashboard displayed as 404 instead of showing
validation error
(#211661)](#211661)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-05-07T19:32:04Z","message":"[dashboard]
fix invalid dashboard displayed as 404 instead of showing validation
error (#211661)\n\nCloses
https://github.com/elastic/kibana/issues/211659\n\nPR updates
`loadDashboardState` to throw content management error when\nstatus is
not a 404. PR does not attempt to clean-up DashboardRenderer's\ndisplay
of the error.\n\n<img width=\"500\" alt=\"Screenshot 2025-05-07 at 8 20
02 AM\"\nsrc=\"https://github.com/user-attachments/assets/39883951-d4df-46fa-9950-bb8103898b6b\"\n/>\n\n\n###
test instructions\n1) use saved object import to import dashboard with
schema errors
-\nhttps://github.com/elastic/kibana/blob/main/x-pack/test/functional/apps/dashboard/group2/migration_smoke_tests/exports/lens_dashboard_migration_test_7_12_1.ndjson.\n2)
open dashboard, verify schema validation error is
displayed.\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"670ff4ee06089711a20201c0093c83abbe4db2bf","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.1.0","v8.19.0"],"title":"[dashboard]
fix invalid dashboard displayed as 404 instead of showing validation
error","number":211661,"url":"https://github.com/elastic/kibana/pull/211661","mergeCommit":{"message":"[dashboard]
fix invalid dashboard displayed as 404 instead of showing validation
error (#211661)\n\nCloses
https://github.com/elastic/kibana/issues/211659\n\nPR updates
`loadDashboardState` to throw content management error when\nstatus is
not a 404. PR does not attempt to clean-up DashboardRenderer's\ndisplay
of the error.\n\n<img width=\"500\" alt=\"Screenshot 2025-05-07 at 8 20
02 AM\"\nsrc=\"https://github.com/user-attachments/assets/39883951-d4df-46fa-9950-bb8103898b6b\"\n/>\n\n\n###
test instructions\n1) use saved object import to import dashboard with
schema errors
-\nhttps://github.com/elastic/kibana/blob/main/x-pack/test/functional/apps/dashboard/group2/migration_smoke_tests/exports/lens_dashboard_migration_test_7_12_1.ndjson.\n2)
open dashboard, verify schema validation error is
displayed.\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"670ff4ee06089711a20201c0093c83abbe4db2bf"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211661","number":211661,"mergeCommit":{"message":"[dashboard]
fix invalid dashboard displayed as 404 instead of showing validation
error (#211661)\n\nCloses
https://github.com/elastic/kibana/issues/211659\n\nPR updates
`loadDashboardState` to throw content management error when\nstatus is
not a 404. PR does not attempt to clean-up DashboardRenderer's\ndisplay
of the error.\n\n<img width=\"500\" alt=\"Screenshot 2025-05-07 at 8 20
02 AM\"\nsrc=\"https://github.com/user-attachments/assets/39883951-d4df-46fa-9950-bb8103898b6b\"\n/>\n\n\n###
test instructions\n1) use saved object import to import dashboard with
schema errors
-\nhttps://github.com/elastic/kibana/blob/main/x-pack/test/functional/apps/dashboard/group2/migration_smoke_tests/exports/lens_dashboard_migration_test_7_12_1.ndjson.\n2)
open dashboard, verify schema validation error is
displayed.\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"670ff4ee06089711a20201c0093c83abbe4db2bf"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Nathan Reese <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Copy file name to clipboardExpand all lines: src/platform/plugins/shared/dashboard/public/services/dashboard_content_management_service/lib/load_dashboard_state.ts
0 commit comments