Then you need to update your curl code to capture HTTP respons codes and JSON errors and/or curl verbose out and debug.