Skip to content

Commit b610f18

Browse files
committed
invalid session handling
1 parent 5292551 commit b610f18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jbrowse/src/client/JBrowse/Browser/Browser.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function View(){
4747
Ajax.request({
4848
url: ActionURL.buildURL('jbrowse', 'getSession.api'),
4949
method: 'GET',
50-
success: function(res){ // TODO - handle empty request better
50+
success: function(res){
5151
setState(generateViewState(JSON.parse(res.response)));
5252
console.log(res);
5353
},
@@ -66,7 +66,7 @@ function View(){
6666
return (<p>Loading...</p>)
6767
}
6868
else if (state == "invalid") {
69-
return (<p>"Error fetching config. See console for more details"</p>)
69+
return (<p>Error fetching config. See console for more details</p>)
7070
}
7171
return (
7272
<ThemeProvider theme={theme}>

jbrowse/src/org/labkey/jbrowse/JBrowseController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ public Object execute(GetSessionForm form, BindException errors) throws Exceptio
771771
}
772772
else
773773
{
774-
resp = null;
774+
throw new FileNotFoundException("File not found.");
775775
}
776776

777777
return new ApiSimpleResponse(resp);

0 commit comments

Comments
 (0)