HUE-7533 [filebrowser] Wrong error message in UI with 500 error when user tries to edit read_only file in File browser

Review Request #11851 — Created Oct. 25, 2017 and submitted

yingc
hue
master
HUE-7533
hue
enricoberti, jgauthier, johan, krish, romain, weixia
commit 035065a3c9c44a63adeef5248189b650bac1a823 (HEAD -> master)
Author: Ying Chen <yingchen@cloudera.com>
Date:   Wed Oct 25 14:40:16 2017 -0700

    HUE-7533 [fb] Wrong error message in UI with 500 error when user tries to edit read_only file in File browser

:100644 100644 5e020ef009... 309182c31f... M    apps/filebrowser/src/filebrowser/templates/listdir_components.mako


  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
romain
  1. 
      
  2. Safer and not changing any existing logic?

    if (x.status == 500 && x.responseText.indexOf("jobbrowser") == -1) {
    if (x.responseJSON && x.responseJSON.detail) {
    $(document).trigger("error", x.responseJSON.detail);
    }
    else {
    $(document).trigger("error", "${_('There was a problem with your request.')}");

          }
          $("#hueBreadcrumbText").blur();
    

    }

  3. 
      
yingc
yingc
romain
  1. Ship It!
  2. 
      
yingc
Review request changed

Status: Closed (submitted)

Loading...