Handled decoding errors to throw 400 instead of 500