02-23-2023 07:03 AM
Hello,
API Explorer response for https://api.ebay.com/sell/inventory/v1/bulk_migrate_listing
{
"responses": [
{
"statusCode": 400,
"listingId": "184762324743",
"marketplaceId": "EBAY_DE",
"errors": [
{
"errorId": 25002,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "A user error has occurred. The listing SKU cannot be null or empty."
}
]
}
]
}
Response for API the same URL and the same parameters as in API explorer
{
"errors": [{
"errorId": 2003,
"domain": "ACCESS",
"category": "APPLICATION",
"message": "Internal error",
"longMessage": "There was a problem with an eBay internal system or process. Contact
eBay developer support for assistance",
"parameters": [{
"name": "reason",
"value": "Failed to transform underlying error response, see logs."
}]
}]
}
Same account. Production in both cases. Same parameters. Yes, I know that you need to set the SKU for the offer before migration, but that's not the problem.
API Explorer gives more specific error details, API doesn't. So what? if I have a general error in the API, I have to make a query through API Explorer to get to know the details?!
Tell me what I'm doing wrong. I want the same error descriptions in the API.
Regards
Solved! Go to Best Answer
02-23-2023 12:15 PM - edited 02-23-2023 12:15 PM
for a request payload of:
{"requests":[{"listingId":"<your_item_id>"}]}
I receive in both the explorer and directly the following response.
{
"responses": [
{
"statusCode": 400,
"listingId": "<your_item_id>",
"errors": [
{
"errorId": 25002,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "A user error has occurred. Invalid listing id"
}
]
}
]
}
If I don't send a payload, I receive in both the following:
{
"errors": [
{
"errorId": 2003,
"domain": "ACCESS",
"category": "APPLICATION",
"message": "Internal error",
"longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance"
}
]
}
If I add a header of Accept:text/html to the headers section of the API Explorer I receive the exact error message you get.
{
"errors": [
{
"errorId": 2003,
"domain": "ACCESS",
"category": "APPLICATION",
"message": "Internal error",
"longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance",
"parameters": [
{
"name": "reason",
"value": "Failed to transform underlying error response, see logs."
}
]
}
]
}
So my guess is it is likely a header issue, to a lesser extent perhaps something with the payload, -- in whatever client you are using to interface with the API.
02-23-2023 12:15 PM - edited 02-23-2023 12:15 PM
for a request payload of:
{"requests":[{"listingId":"<your_item_id>"}]}
I receive in both the explorer and directly the following response.
{
"responses": [
{
"statusCode": 400,
"listingId": "<your_item_id>",
"errors": [
{
"errorId": 25002,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "A user error has occurred. Invalid listing id"
}
]
}
]
}
If I don't send a payload, I receive in both the following:
{
"errors": [
{
"errorId": 2003,
"domain": "ACCESS",
"category": "APPLICATION",
"message": "Internal error",
"longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance"
}
]
}
If I add a header of Accept:text/html to the headers section of the API Explorer I receive the exact error message you get.
{
"errors": [
{
"errorId": 2003,
"domain": "ACCESS",
"category": "APPLICATION",
"message": "Internal error",
"longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance",
"parameters": [
{
"name": "reason",
"value": "Failed to transform underlying error response, see logs."
}
]
}
]
}
So my guess is it is likely a header issue, to a lesser extent perhaps something with the payload, -- in whatever client you are using to interface with the API.
02-24-2023 02:37 AM - edited 02-24-2023 02:39 AM
Hello,
thank you very much for your help.
I checked the request headers as you suggested.
The bulkMigrateListing method requires a header in the request: 'Accept', 'application/json' to return detailed errors. This method works fine without this header, it just doesn't return detailed error information if the header is missing.
Now I have this response for an attempt to migrate a multi-variant offer that has no SKU/groupId set.
{
"responses":[
{
"statusCode":400,
"listingId":"1********7",
"marketplaceId":"EBAY_DE",
"errors":[
{
"errorId":25002,
"domain":"API_INVENTORY",
"subdomain":"Selling",
"category":"REQUEST",
"message":"A user error has occurred. The listing SKU cannot be null or empty."
}]
}]
}
Thank you for your time
Regards