Skip to content

Commit

Permalink
Remove unused information from error message (#7267)
Browse files Browse the repository at this point in the history
  • Loading branch information
kajarenc committed Sep 2, 2023
1 parent 1ffaf67 commit b617e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/streamlit/web/server/upload_file_request_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def put(self, **kwargs):

try:
if not self._is_active_session(session_id):
raise Exception(f"Invalid session_id: '{session_id}'")
raise Exception(f"Invalid session_id")
except Exception as e:
self.send_error(400, reason=str(e))
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,5 @@ def test_upload_one_file(self):
params = {file.name: file.data}
response = self._upload_files(params, session_id="sessionId", file_id="fileId")
self.assertEqual(400, response.code)
self.assertIn("Invalid session_id: 'sessionId'", response.reason)
self.assertIn("Invalid session_id", response.reason)
self.assertEqual(self.file_mgr.get_files("sessionId", ["fileId"]), [])

0 comments on commit b617e07

Please sign in to comment.