mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
ui: handle errors from unimplemented services (#18020)
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.
This commit is contained in:
3
.changelog/18020.txt
Normal file
3
.changelog/18020.txt
Normal file
@@ -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
|
||||||
|
```
|
||||||
@@ -44,7 +44,9 @@ export default class ApplicationAdapter extends RESTAdapter {
|
|||||||
return super.findAll(...arguments).catch((error) => {
|
return super.findAll(...arguments).catch((error) => {
|
||||||
const errorCodes = codesForError(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) {
|
if (isNotImplemented) {
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in New Issue
Block a user