422 Unprocessable Entity response to /contacts/:id

Hi,

I’ve been asked to look into an issue one of our clients is having with
their FreeAgent integration. It seems like some (possibly all?) requests
to https://api.freeagent.com/v2/contacts/:id are returning a 422
Unprocessable Entity response.

From what I understand from your docs, and looking at the code, the only
data we provide to that call is the id, which forms part of the URL, we’re
not providing any kind of request body to process.

Is it possible that that request is being misinterpreted as being in a
format the API doesn’t understand? Even though we’re not providing any
content is the server misinterpreting it as, say, a HTML-formatted request
rather than a JSON-formatted request?

An example from our logs:

[2015-12-04 10:08:37] Unexpected HTTP response 422 - Unprocessable Entity
returned from call to ‘contacts/3462563’.

[2015-12-04 09:11:15] Unexpected HTTP response 422 - Unprocessable Entity
returned from call to ‘contacts/4154876’.

Our client tells me that it’s not all requests that are failing, and they
say it’s been working as expected up until the last day or so. They’ve also
been able to look up the contacts that requests have failed for on their
FreeAgent account; those contacts exist and there doesn’t seem to be any
pattern that would indicate some common reason the requests fail.

Anything you can do to help me track down what might be causing this would
be extremely helpful. If you need any more info let me know and I’ll see if
I can get hold of it.

Thanks,

Dave

Hi Alberto,

Yup, that’s no problem, we’ve got a fix in testing now that we’re expecting
to deploy to live today. Thanks for getting back to us though :slight_smile:

DaveOn Monday, 7 December 2015 10:24:58 UTC, Alberto Fernández-Capel wrote:

Hi Dave,

From what I see in the logs, our API was ignoring the invalid
charge_sales_tax attribute
until a recent change we deployed last week. It seems that this change is
the cause
that these requests are rejected now. I’m sorry for the inconvenience, but
we’d like to keep that
behaviour as it is more faithful to our public API documentation. Could
you change the param
on your side?

Please, let us know if we can help somehow.

Cheers,

– Alberto

On Fri, Dec 4, 2015 at 5:26 PM, Dave Downs <dave.d...@gmail.com <javascript:>> wrote:

Hi Alberto,

Thanks for pointing me in the right direction, we’re going to try
updating it Monday and see how we get on. I’m coming in at the back-end of
this functionality having been implemented I’m afraid so I’m having to
piece together how it’s working. Do you know whether there have actually
been any successful calls to update or create contacts because given what
you’ve said, the error we’re receiving, and the code I have, I can’t see
that it will ever had made a valid request.

Thanks,

Dave

On Friday, 4 December 2015 11:33:19 UTC, Alberto Fernández-Capel wrote:

Hi Dave,

from what I see in our logs those requests are trying to set the
charge_sales_tax contact attribute to true.

However, our permitted value for that attribute are: “Auto” (default),
“Always” or “Never”.

FreeAgent Developer Dashboard

Hope that helps, but please let me know if it doesn’t.

– Alberto

On Fri, Dec 4, 2015 at 10:21 AM, Dave Downs dave.d...@gmail.com wrote:

Hi,

I’ve been asked to look into an issue one of our clients is having with
their FreeAgent integration. It seems like some (possibly all?) requests to
https://api.freeagent.com/v2/contacts/:id are returning a 422
Unprocessable Entity response.

From what I understand from your docs, and looking at the code, the
only data we provide to that call is the id, which forms part of the URL,
we’re not providing any kind of request body to process.

Is it possible that that request is being misinterpreted as being in a
format the API doesn’t understand? Even though we’re not providing any
content is the server misinterpreting it as, say, a HTML-formatted request
rather than a JSON-formatted request?

An example from our logs:

[2015-12-04 10:08:37] Unexpected HTTP response 422 - Unprocessable
Entity returned from call to ‘contacts/3462563’.

[2015-12-04 09:11:15] Unexpected HTTP response 422 - Unprocessable
Entity returned from call to ‘contacts/4154876’.

Our client tells me that it’s not all requests that are failing, and
they say it’s been working as expected up until the last day or so. They’ve
also been able to look up the contacts that requests have failed for on
their FreeAgent account; those contacts exist and there doesn’t seem to be
any pattern that would indicate some common reason the requests fail.

Anything you can do to help me track down what might be causing this
would be extremely helpful. If you need any more info let me know and I’ll
see if I can get hold of it.

Thanks,

Dave


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_ap...@googlegroups.com.
To post to this group, send email to freeag...@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_ap...@googlegroups.com <javascript:>.
To post to this group, send email to freeag...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Hi Dave,

From what I see in the logs, our API was ignoring the invalid
charge_sales_tax attribute
until a recent change we deployed last week. It seems that this change is
the cause
that these requests are rejected now. I’m sorry for the inconvenience, but
we’d like to keep that
behaviour as it is more faithful to our public API documentation. Could you
change the param
on your side?

Please, let us know if we can help somehow.

Cheers,

– AlbertoOn Fri, Dec 4, 2015 at 5:26 PM, Dave Downs dave.downs.uk@gmail.com wrote:

Hi Alberto,

Thanks for pointing me in the right direction, we’re going to try updating
it Monday and see how we get on. I’m coming in at the back-end of this
functionality having been implemented I’m afraid so I’m having to piece
together how it’s working. Do you know whether there have actually been any
successful calls to update or create contacts because given what you’ve
said, the error we’re receiving, and the code I have, I can’t see that it
will ever had made a valid request.

Thanks,

Dave

On Friday, 4 December 2015 11:33:19 UTC, Alberto Fernández-Capel wrote:

Hi Dave,

from what I see in our logs those requests are trying to set the
charge_sales_tax contact attribute to true.

However, our permitted value for that attribute are: “Auto” (default),
“Always” or “Never”.

FreeAgent Developer Dashboard

Hope that helps, but please let me know if it doesn’t.

– Alberto

On Fri, Dec 4, 2015 at 10:21 AM, Dave Downs dave.d...@gmail.com wrote:

Hi,

I’ve been asked to look into an issue one of our clients is having with
their FreeAgent integration. It seems like some (possibly all?) requests to
https://api.freeagent.com/v2/contacts/:id are returning a 422
Unprocessable Entity response.

From what I understand from your docs, and looking at the code, the only
data we provide to that call is the id, which forms part of the URL, we’re
not providing any kind of request body to process.

Is it possible that that request is being misinterpreted as being in a
format the API doesn’t understand? Even though we’re not providing any
content is the server misinterpreting it as, say, a HTML-formatted request
rather than a JSON-formatted request?

An example from our logs:

[2015-12-04 10:08:37] Unexpected HTTP response 422 - Unprocessable
Entity returned from call to ‘contacts/3462563’.

[2015-12-04 09:11:15] Unexpected HTTP response 422 - Unprocessable
Entity returned from call to ‘contacts/4154876’.

Our client tells me that it’s not all requests that are failing, and
they say it’s been working as expected up until the last day or so. They’ve
also been able to look up the contacts that requests have failed for on
their FreeAgent account; those contacts exist and there doesn’t seem to be
any pattern that would indicate some common reason the requests fail.

Anything you can do to help me track down what might be causing this
would be extremely helpful. If you need any more info let me know and I’ll
see if I can get hold of it.

Thanks,

Dave


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_ap...@googlegroups.com.
To post to this group, send email to freeag...@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Hi Alberto,

Thanks for pointing me in the right direction, we’re going to try updating
it Monday and see how we get on. I’m coming in at the back-end of this
functionality having been implemented I’m afraid so I’m having to piece
together how it’s working. Do you know whether there have actually been any
successful calls to update or create contacts because given what you’ve
said, the error we’re receiving, and the code I have, I can’t see that it
will ever had made a valid request.

Thanks,

DaveOn Friday, 4 December 2015 11:33:19 UTC, Alberto Fernández-Capel wrote:

Hi Dave,

from what I see in our logs those requests are trying to set the
charge_sales_tax contact attribute to true.

However, our permitted value for that attribute are: “Auto” (default),
“Always” or “Never”.

FreeAgent Developer Dashboard

Hope that helps, but please let me know if it doesn’t.

– Alberto

On Fri, Dec 4, 2015 at 10:21 AM, Dave Downs <dave.d...@gmail.com <javascript:>> wrote:

Hi,

I’ve been asked to look into an issue one of our clients is having with
their FreeAgent integration. It seems like some (possibly all?) requests to
https://api.freeagent.com/v2/contacts/:id are returning a 422
Unprocessable Entity response.

From what I understand from your docs, and looking at the code, the only
data we provide to that call is the id, which forms part of the URL, we’re
not providing any kind of request body to process.

Is it possible that that request is being misinterpreted as being in a
format the API doesn’t understand? Even though we’re not providing any
content is the server misinterpreting it as, say, a HTML-formatted request
rather than a JSON-formatted request?

An example from our logs:

[2015-12-04 10:08:37] Unexpected HTTP response 422 - Unprocessable Entity
returned from call to ‘contacts/3462563’.

[2015-12-04 09:11:15] Unexpected HTTP response 422 - Unprocessable Entity
returned from call to ‘contacts/4154876’.

Our client tells me that it’s not all requests that are failing, and they
say it’s been working as expected up until the last day or so. They’ve also
been able to look up the contacts that requests have failed for on their
FreeAgent account; those contacts exist and there doesn’t seem to be any
pattern that would indicate some common reason the requests fail.

Anything you can do to help me track down what might be causing this
would be extremely helpful. If you need any more info let me know and I’ll
see if I can get hold of it.

Thanks,

Dave


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_ap...@googlegroups.com <javascript:>.
To post to this group, send email to freeag...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Hi Dave,

from what I see in our logs those requests are trying to set the
charge_sales_tax contact attribute to true.

However, our permitted value for that attribute are: “Auto” (default),
“Always” or “Never”.

Hope that helps, but please let me know if it doesn’t.

– AlbertoOn Fri, Dec 4, 2015 at 10:21 AM, Dave Downs dave.downs.uk@gmail.com wrote:

Hi,

I’ve been asked to look into an issue one of our clients is having with
their FreeAgent integration. It seems like some (possibly all?) requests to
https://api.freeagent.com/v2/contacts/:id are returning a 422
Unprocessable Entity response.

From what I understand from your docs, and looking at the code, the only
data we provide to that call is the id, which forms part of the URL, we’re
not providing any kind of request body to process.

Is it possible that that request is being misinterpreted as being in a
format the API doesn’t understand? Even though we’re not providing any
content is the server misinterpreting it as, say, a HTML-formatted request
rather than a JSON-formatted request?

An example from our logs:

[2015-12-04 10:08:37] Unexpected HTTP response 422 - Unprocessable Entity
returned from call to ‘contacts/3462563’.

[2015-12-04 09:11:15] Unexpected HTTP response 422 - Unprocessable Entity
returned from call to ‘contacts/4154876’.

Our client tells me that it’s not all requests that are failing, and they
say it’s been working as expected up until the last day or so. They’ve also
been able to look up the contacts that requests have failed for on their
FreeAgent account; those contacts exist and there doesn’t seem to be any
pattern that would indicate some common reason the requests fail.

Anything you can do to help me track down what might be causing this would
be extremely helpful. If you need any more info let me know and I’ll see if
I can get hold of it.

Thanks,

Dave


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.