to get a personalized navigation.
to get a personalized navigation.
Hi,
When something goes wrong in our API service call to Visma, we get a truncated error. However, when making the same call from the Swagger page, we get the full error. It would be really useful if we could somehow also get the full error to our own app with a header to indicate that, or just by default. We can retrieve entire documents but are somehow not allowed to retrieve a full error when doing a request. There is also no id except the ipp-request-id to maybe fetch what went wrong, which us users can not use.
Can you help us retrieve full errors when something fails in our API call?
Thanks ahead.
Solved! Go to Solution.
Hey there, the cause has been found, it appears to be a problem on our end that would've come to light had we just thrown the CURL call through. If others are finding this in PHP using Guzzle, then they need to try catch capture the BadResponseException around the ->send() and recreate it as Guzzle cuts it off in creating the error. The response body still holds the original full sized error.
https://github.com/guzzle/psr7/blob/2.5/src/Message.php#L75
Could you please send us the ipp-request-id and the error message you received?
We'll check if it get's truncated on our end.
Thank you.
Hi,
Any updates on this?
Hi,
We're still looking into this, do you happen to have any more examples of truncated errors, if so please send us the ipp-request-id and we'll keep investigating.
Thank you.
Hi,
038e874c-8aa0-4123-b8fe-2519d9617394
Client error: `POST https://integration.visma.net/API/controller/api/v1/supplierInvoice` resulted in a `400 Bad Request` response: {"message":"Error creating supplierInvoice. {\"1\":{\"SubID\":\"An error in processing of field Subaccount: Error: Koste (truncated...)
3b787520-066d-42bc-abc8-be4cc1409da5
{ "message": "Error creating supplierInvoice. {\"1\":{\"SubID\":\"An error in processing of field Subaccount: Error: Kostenplaats of Subaccount do not exist.\"},\"2\":{\"SubID\":\"An error in processing of field Subaccount: Error: Kostenplaats of Subaccount do not exist.\"},\"3\":{\"SubID\":\"An error in processing of field Subaccount: Error: Kostenplaats of Subaccount do not exist.\"}}" }
Copyright © 2022 Visma.com. All rights reserved.