Improve error handling for Storage class #916
Labels
compatibility
Related to compatibility with specific frameworks, environments, browsers, etc.
enhancement
Enhancement to an existing feature or behavior.
The
Storage
class will only work if it is instantiated in an environment (the browser) wherewindow.sessionStorage
orwindow.localStorage
exist. Currently,UserAgentApplication
assumes that any uncaught error from theStorage
constructor is a result of an invalidcacheLocation
string, however, an error could be thrown ifwindow
doesn't exist at all, such as whenmsal
is server-side rendered. We should add a new error message to catch this scenario.See: #914
AC:
msal
is server-side rendered, it throws an error message communicating that it cannot be server-side rendered.The text was updated successfully, but these errors were encountered: