We have had an integration running for a year now, and have not made any changes, but suddenly we receive “Bad response to callout - code: 406 status: Not Acceptable body: HTTP/1.1 500 Internal Server Error” to all requests to the invoices API at (https://connect.squareup.com/v2/invoices). Example request is below. Is this a server side bug? It has been there for at least a couple days…
Take a look at my original message - it is returning a 406 error, but the body of the error message says “500 internal server error”, so it is doubly confusing. The requests are coming from Salesforce so I don’t have the IP but you should be able to see it on your end.
What’s odd is that in you API logs there isn’t a body that’s showing an internal server error. That’s why we need the IP address to find the issue. Do you know what IP address these requests are coming from? We don’t have a way to find it on our end nor can we confirm we’re looking at the right ones.
Hi, has the team responded with the reason why the request we are sending would ever result in this 406 error? The customer has not been able to create their invoices for a week now.
That resolved the 406 (now I have a 400 - but that’s an issue I can figure out). I haven’t had accept in the header for any other API calls. Why does the invoices API fail without it? And will it cause any issues if I add it into the other API calls (customers, orders, etc)?
Um, I think my post got hijacked…? @Bryan-Square I don’t know who @crhhe3 is (?), but to answer your previous question, yes the customer was able to create invoices previously. Like I mentioned in the original post, this has been running for a year already.
Sorry @numberforty1. I thought I was responding to an email, rather than this post. I am also integrating with Salesforce and hit the same 406 error. Didn’t mean to hijack.
@numberforty1 It appears that the Salesforce integration that you’re using is setting the Accept for you. When we get the request it looks like accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 and that is what’s causing the issue. We’ve been able to replicate this on our end as well.