Skip to content

Commit

Permalink
ui: handle errors from unimplemented services
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lgfa29 committed Jul 20, 2023
1 parent f529124 commit 84add6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
Expand Down

0 comments on commit 84add6a

Please sign in to comment.