Earlier the error messages were truncated like the following:
"Client error:POST https:\/\/sandbox-rest.avatax.com\/api\/v2\/transactions\/createresulted in a401 Unauthorizedresponse:\n{\"error\": {\"code\": \"AuthenticationException\",\"message\": \"Authentication failed.\",\"details\": [{\"code\": \"AuthenticationExc (truncated...)\n"
Post fix, the error message would look like the following:
"{\"error\": {\"code\": \"AuthenticationException\",\"message\": \"Authentication failed.\",\"details\": [{\"code\": \"AuthenticationException\",\"message\": \"Authentication failed.\",\"description\": \"Missing authentication or unable to authenticate the user or the account.\",\"faultCode\": \"Client\",\"helpLink\": \"http:\/\/developer.avalara.com\/avatax\/errors\/AuthenticationException\"}]}}"
This PR will take care of the following github issues:
Earlier the error messages were truncated like the following:
"Client error:
POST https:\/\/sandbox-rest.avatax.com\/api\/v2\/transactions\/createresulted in a
401 Unauthorizedresponse:\n{\"error\": {\"code\": \"AuthenticationException\",\"message\": \"Authentication failed.\",\"details\": [{\"code\": \"AuthenticationExc (truncated...)\n"
Post fix, the error message would look like the following:
"{\"error\": {\"code\": \"AuthenticationException\",\"message\": \"Authentication failed.\",\"details\": [{\"code\": \"AuthenticationException\",\"message\": \"Authentication failed.\",\"description\": \"Missing authentication or unable to authenticate the user or the account.\",\"faultCode\": \"Client\",\"helpLink\": \"http:\/\/developer.avalara.com\/avatax\/errors\/AuthenticationException\"}]}}"
This was explained in detail here: https://laracasts.com/discuss/channels/general-discussion/guzzle-error-message-gets-truncated?page=1&replyId=127348