How to catch 401 erros when loading new tab?

2 posts, 0 answers
  1. Lee Saunders
    Lee Saunders avatar
    20 posts
    Member since:
    Jul 2009

    Posted 28 Apr 2014 Link to this post

    My company is building a website that loads pages into kendo tabs using .append and contentUrl.  But our forms based security has overloaded the MVC AuthorizeCore for security and if they user is not authorized to view that URL, then it is sent to our overload of HandleUnauthorizedRequest.

    We then set the filterContext.Result to a 401 - Not Authorized error.

    But, the tab strip continues to add a tab.  How can I trap an http error and have the tabstrip not add a new tab?

  2. Kamen Bundev
    Kamen Bundev avatar
    1532 posts

    Posted 30 Apr 2014 Link to this post

    Hi Lee,

    You can use the TabStrip error event, check for status code 401 and remove the added tab. Here is a similar scenario, but checking for Internal Server Error 500.

    Let me know if this helps.

    Kamen Bundev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top