to get a personalized navigation.
to get a personalized navigation.
Hi,
does there exists a documentation about the errror-statuses returned by API - ref
https://docs.business.visma.net/docs/features/errors
"extensions": {
"data": {
"status": 3
}
}
is there an own status for "already exists"?
Florian
Solved! Go to Solution.
We have added support for including status code names in the response. Example:
{
"errors": [
{
"message": "A record with the same primary key already exists.",
"path": [
"useCompany",
"order_create",
"values/0"
],
"extensions": {
"data": {
"status": 3,
"status_name": "PrimaryKeyAssignmentFailed"
}
}
}
],
"data": {
"useCompany": {
"order_create": {
"items": null
}
}
}
}
You can read about it here: https://docs.business.visma.net/docs/features/errors#understanding-error-information
Hi Marius,
yes, but do you know what the meanings of the codes are? Which can we except and what does the codes say us?
Florian
By definition we should know the meaning of error codes, yes. 🙂
Are you asking if we can specify what error codes a certain operation can return?
No, not really. If you do an operation like an insert, that's composed of multiple suboperations and each of these may return different error codes. However, these error codes are returned from the backend (VBus). There is nothing generated in GraphQL. And many of them would not tell you much even if we return their name/description rather than the code. That's why we have chosen to return numerical values that you can report back to us when you have an error.
I will open up an internal discussion to evaluate whether we can/should return code names not just code values.
These are internal error codes, that's why they are returned as numbers
Copyright © 2022 Visma.com. All rights reserved.