Rigbox icon indicating copy to clipboard operation
Rigbox copied to clipboard

JSON no longer returned

Open todo[bot] opened this issue 5 years ago • 2 comments

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.

todo[bot] avatar May 21 '19 14:05 todo[bot]

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.

k1o0 avatar Aug 01 '19 16:08 k1o0

Removed FIXME in commit 31641f183db7070d8597917dde2fdae724d916e6 but above statement still stands.

k1o0 avatar Nov 04 '19 10:11 k1o0