I’ve attached the response from the log in the screenshot below. For context, I’m using this within a flow I’ve been working on in NodeRed, so this is the response I’m getting when trying to make an HTTP request.
EDIT: The error response I get is in the “payload” index, all I get is the message “Server Error”
production.ERROR: array_merge(): Expected parameter 1 to be an array, null given {"userId":1,"exception":"[object] (ErrorException(code: 0): array_merge(): Expected parameter 1 to be an array, null given at /var/www/invoiceninja/app/Http/Requests/Request.php:42)
Similar to the NodeRed documentation I’ve linked below, instead of passing the URL to the node like in the example, I am instead passing the headers for the request (i.e. msg.headers) and the body of the request (i.e. msg.payload) to the HTTP request note: https://cookbook.nodered.org/http/set-request-url
Yes, this is the only route I’m seeing this issue on. I’ve been able to create and retrieve vendors no problem.
I tried the curl request and it gave me the error message: {"message":"The given data was invalid.","errors":{"vendor_id":["The selected vendor id is invalid."]}}
When I switched to a different vendor id it worked! It’s weird I never got this error message anywhere else though. I tried in Postman as well and the error message was only "message":"Server Error"
Thanks for all your help guys! Very much appreciated
One other thing I noticed, is the order of the keys/values in the object matter. Having the “date” field first helped (I went back to NodeRed with a different vendor id like in the curl request, but I kept getting the error). It was only after moving the “date” field to the first position that got my flow in NodeRed to work (like in the curl example).