Rigbox
Rigbox copied to clipboard
JSON no longer returned
https://github.com/cortex-lab/Rigbox/blob/19018b4133c33be2947301dd3d0122fcc6a38e24/+eui/AlyxPanel.m#L672-L677
This issue was generated by todo based on a FIXME
comment in 19018b4133c33be2947301dd3d0122fcc6a38e24 when #118 was merged. cc @cortex-lab.
This catch block is never really used: the code checks for water restricted mice so if a mouse doesn't exist at all then obj.WaterRequiredText.String
will be set to "Subject %s not on water restriction"
. The block here would only come into effect if the server returned a 500 or timed out in which case this "Subject %s not found in alyx"
would be a misleading statement. Finally, the message is no longer returned as json and so there is no 'detail' field. Solution: remove the try catch block entirely or change it to throw a better error.
Removed FIXME in commit 31641f183db7070d8597917dde2fdae724d916e6 but above statement still stands.