This is a migrated thread and some comments may be shown as answers.

How to catch 401 erros when loading new tab?

1 Answer 91 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Lee Saunders
Top achievements
Rank 1
Lee Saunders asked on 28 Apr 2014, 06:35 PM
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?

Lee

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 30 Apr 2014, 08:50 AM
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.

Regards,
Kamen Bundev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TabStrip
Asked by
Lee Saunders
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or