kuzzleio / kuzzle-admin-console

A SPA to administrate your Kuzzle: index and collection management, document creation, realtime subscription and permissions management
http://console.kuzzle.io
Apache License 2.0
61 stars 25 forks source link

Update Role Anonymous role while connected as anonymous #910

Closed Yoann-Abbes closed 3 years ago

Yoann-Abbes commented 3 years ago

Expected Behavior

Have the same message as Kourou : ErrorCannot remove the "login" action from the anonymous role. when you edit anonymous role and remove login

Current Behavior

While you are trying to changes the role of Anonymous and forgot to let auth:login true you get an non readable stacktrace

vue-logger.js:95   Error
    at m.value (kuzzle.js:2)
    at x.value (kuzzle.js:2)
    at c.value (kuzzle.js:2)
    at c.value (kuzzle.js:2)
    at store.ts:109
    at Generator.next (<anonymous>)
    at r (asyncToGenerator.js:3)
    at s (asyncToGenerator.js:25)
    at asyncToGenerator.js:32
    at new Promise (<anonymous>)
    at asyncToGenerator.js:21
    at v.fetchIndexList (store.ts:104)
    at Array.<anonymous> (vuex.esm.js:747)
    at v.dispatch (vuex.esm.js:438)
    at dispatch (vuex.esm.js:332)
    at Object.S.e.<computed> [as fetchIndexList] (direct-vuex.esm.js:148)
e.printLogMessage @ vue-logger.js:95
vue-router.esm.js:2051 Uncaught (in promise) t
vue-logger.js:95   Error
    at m.value (kuzzle.js:2)
    at x.value (kuzzle.js:2)
    at value (kuzzle.js:2)
    at value (kuzzle.js:2)
    at CreateOrUpdate.vue:216
    at Generator.next (<anonymous>)
    at r (asyncToGenerator.js:3)
    at s (asyncToGenerator.js:25)
    at asyncToGenerator.js:32
    at new Promise (<anonymous>)
    at asyncToGenerator.js:21
    at a.submit (CreateOrUpdate.vue:207)
    at nt (vue.runtime.esm.js:1854)
    at HTMLButtonElement.n (vue.runtime.esm.js:2175)
    at HTMLButtonElement.Xi.o._wrapper (vue.runtime.esm.js:6911)

manifest.json:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Possible Solution

Steps to Reproduce

1. 2. 3.

Context (Environment)

Kuzzle version: Node.js version: Admin Console version:

xbill82 commented 3 years ago

You mean we should have a more readable error?

berthieresteban commented 3 years ago

Can't reproduce image