HUE-5929 [metastore] Show sample API errors in the panel instead of as a page notification

Review Request #9778 — Created March 10, 2017 and submitted

johan
hue
master
hue
enricoberti, jennykim, krish, ranade, romain, weixia
commit d97c6ad7dd52a5fec6ff5fd56835ee4293be3b15
Author: Johan Ahlen <johan@johanahlen.com>
Date:   Fri Mar 10 15:08:17 2017 +0100

    HUE-5929 [metastore] Show sample API errors in the panel instead of as a page notification

:100644 100644 0e576b2... b468331... M	apps/metastore/src/metastore/static/metastore/js/metastore.ko.js
:100644 100644 26a4f0d... 7b53d11... M	apps/metastore/src/metastore/templates/metastore.mako

Manual on Chrome

https://dl.dropbox.com/s/uo44tt6mip3kxwy/Screenshot%202017-03-10%2015.08.41.png?dl=0

  • 1
  • 0
  • 0
  • 0
  • 1
Description From Last Updated
Could we print the actual error message? It contains the info about missing permission or query timeout. No user has ... romain romain
enricoberti
  1. Better!

  2. 
      
johan
Review request changed

Status: Closed (submitted)

romain
  1. 
      
  2. Could we print the actual error message?

    It contains the info about missing permission or query timeout.

    No user has access to server logs, and we should hint them to the problem.

    1. Ha! Didn't see status = 1 and the message. This one catches all, errors in success response or errors in error response, according to the logic in ApiHelper, that we don't want to print here.

      For the message, it's very similar to the assist search errors (except status = -2 there and the additional message.message). I'll create a ko binding for in-page errors (given any server response) instead. I'll adapt all the different types of Hue API errors somewhere to a common format, it's suboptimal but I'll do it on the js side to get things going.

    2. Would you prefer another status code?

  3. 
      
Loading...