github.com/outbrain/consul@v1.4.5/ui-v2/app/utils/http/acl/is-valid-server-error.js (about)

     1  // very specific error check just for one specific ACL case
     2  // likely to be reused at a later date, so lets use the specific
     3  // case we need right now as default
     4  const UNKNOWN_METHOD_ERROR = "rpc error making call: rpc: can't find method ACL";
     5  export default function(response = UNKNOWN_METHOD_ERROR) {
     6    return function(e) {
     7      if (e && e.errors && e.errors[0] && e.errors[0].detail) {
     8        return e.errors[0].detail.indexOf(response) !== -1;
     9      }
    10      return false;
    11    };
    12  }