Skip to content

Commit

Permalink
Backport of ui: handle errors from unimplemented services into releas…
Browse files Browse the repository at this point in the history
…e/1.5.x (#18025)

This pull request was automerged via backport-assistant
  • Loading branch information
hc-github-team-nomad-core committed Jul 21, 2023
1 parent a5a82da commit 5d710af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/18020.txt
Original file line number Diff line number Diff line change
@@ -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
```
4 changes: 3 additions & 1 deletion ui/app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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 [];
Expand Down

0 comments on commit 5d710af

Please sign in to comment.