From 84add6a06eb5f77d26259dbc32e315b1fcda3815 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Thu, 20 Jul 2023 17:13:06 -0400 Subject: [PATCH 1/2] ui: handle errors from unimplemented services When a request is made to an RPC service that doesn't exist (for example, a cross-region request from a newer version of Nomad to an older version that doesn't implement the endpoint) the application should return an empty list as well. --- ui/app/adapters/application.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/app/adapters/application.js b/ui/app/adapters/application.js index 63f3b14afaea..b212df467df6 100644 --- a/ui/app/adapters/application.js +++ b/ui/app/adapters/application.js @@ -44,7 +44,9 @@ export default class ApplicationAdapter extends RESTAdapter { return super.findAll(...arguments).catch((error) => { const errorCodes = codesForError(error); - const isNotImplemented = errorCodes.includes('501'); + const isNotImplemented = + errorCodes.includes('501') || + error.message.includes("rpc: can't find service"); if (isNotImplemented) { return []; From c0fa25111263a2dccf104fda0375d133a620c5fc Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Thu, 20 Jul 2023 17:18:30 -0400 Subject: [PATCH 2/2] changelog: add entry for #18020 --- .changelog/18020.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/18020.txt diff --git a/.changelog/18020.txt b/.changelog/18020.txt new file mode 100644 index 000000000000..83c18f33408a --- /dev/null +++ b/.changelog/18020.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fixed error handling for cross-region requests when the receiving region does not implement the endpoint being requested +```