Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MessageException handling in get_edit
Fixes https://sentry.galaxyproject.org/share/issue/18f12e228c8d4cf0ac62001b5f5ad938/: ``` Message Uncaught exception in exposed API method: Stack Trace Newest Error: Odd-length string File "encodings/hex_codec.py", line 19, in hex_decode return (binascii.a2b_hex(input), len(input)) Error: decoding with 'hex' codec failed (Error: Odd-length string) File "galaxy/security/idencoding.py", line 94, in decode_id return int(unicodify(id_cipher.decrypt(codecs.decode(obj_id, "hex"))).lstrip("!")) MalformedId: Wrong id ( undefined ) specified, unable to decode. File "galaxy/web/framework/decorators.py", line 206, in decorator rval = func(self, trans, *args, **kwargs) File "galaxy/webapps/galaxy/controllers/dataset.py", line 165, in get_edit data, message = self._get_dataset_for_edit(trans, dataset_id) File "galaxy/webapps/galaxy/controllers/dataset.py", line 433, in _get_dataset_for_edit id = self.decode_id(dataset_id) File "galaxy/webapps/base/controller.py", line 114, in decode_id return managers_base.decode_id(self.app, id) File "galaxy/managers/base.py", line 156, in decode_id return decode_with_security(app.security, id, kind=kind) File "galaxy/managers/base.py", line 160, in decode_with_security return security.decode_id(str(id), kind=kind) File "galaxy/security/idencoding.py", line 100, in decode_id raise galaxy.exceptions.MalformedId( ```
- Loading branch information