Before the JSON printing hook, add a generic hook for any data with
a null body.
This lets the JSON printing hook stay small and single-purpose, but
avoids passing a null bodied error to any subsequent hook.
Fix a dropped assignment in write_error_info() when the output is
JSON.
This was broken at some point in the past, but is basically
unreachable when a normal error occurs, now that we have a dedicated
JSON-printing hook as one of the first hooks.
It needs to either be fixed or removed, and for the immediate change
it is fixed and used by the null data printer.
A couple of test cases are included for the GlobusAPINullDataError
case, which should be easy to identify if it occurs in the wild in the
future.
This lets the JSON printing hook stay small and single-purpose, but avoids passing a null bodied error to any subsequent hook.
This was broken at some point in the past, but is basically unreachable when a normal error occurs, now that we have a dedicated JSON-printing hook as one of the first hooks.
It needs to either be fixed or removed, and for the immediate change it is fixed and used by the null data printer.
A couple of test cases are included for the GlobusAPINullDataError case, which should be easy to identify if it occurs in the wild in the future.