Skip to content

Commit

Permalink
Narrow error response conditional for unified resources fetch (gravit…
Browse files Browse the repository at this point in the history
  • Loading branch information
avatus authored Dec 14, 2023
1 parent 0a09e53 commit 6f1c125
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/packages/teleport/src/services/resources/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ class ResourceService {
// TODO (avatus) : a temporary check to catch unimplemented errors for unified resources
// This is a quick hacky way to catch the error until we migrate completely to unified resources
// DELETE IN 15.0
if (res.response?.status === 404 || res.response?.status === 501) {
if (
(res.response?.status === 404 &&
res.message?.includes('unknown method ListUnifiedResources')) ||
res.response?.status === 501
) {
localStorage.setItem(
KeysEnum.UNIFIED_RESOURCES_NOT_SUPPORTED,
'true'
Expand Down

0 comments on commit 6f1c125

Please sign in to comment.