{tocify} $title={Table of Contents}
As the error says, something went wrong at source side however, I have tested the Rest API using postman and was able to get the response back with data.
And I have reflected same in Source setting of Copy Data activity while creating the pipeline i.e. query, headers – content type and authorization etc
So now I added the query in the expected format against Request Body i.e.
{"query": "{clients {id}}"}
That's it, all worked fine then after.
Issue
A simple Pipeline created to fetch data by querying the Rest
Api and dumping the data received in blob storage, failed with following error:
Error
Operation on target Copy data_From API failed: Failure happened on 'Source' side. ErrorCode=UserErrorHttpStatusCodeIndicatingFailure,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The HttpStatusCode 400 indicates failure. {"errors":{"detail":"Internal server error"}},Source=Microsoft.DataTransfer.ClientLibrary,'
Why it happened
As the error says, something went wrong at source side however, I have tested the Rest API using postman and was able to get the response back with data.
And I have reflected same in Source setting of Copy Data activity while creating the pipeline i.e. query, headers – content type and authorization etc
Still getting the error, I rechecked again the keys,content type etc - no clue.
Took help from colleague and she pointed out the issue, it was with the way the query was posted. The rest api expects Graphql query, she asked me to check code view in postman and the issue was found.
What to do
{"query": "{clients {id}}"}
That's it, all worked fine then after.
If you have questions or suggestions, feel free to do in comments section below !!!
Do share if you find this helpful .......
Knowledge Sharing is Caring !!!!!!
Learn More about some more Azure Data Factory errors
- Cannot find the object "xxx" because it does not exist or you do not have permissions.
- The function 'length' expects its parameter to be an array or a string. The provided value is of type 'Object'.
- ErrorCode=UserErrorInvalidColumnMappingColumnCountMismatch,Message=The column count in column mappings is more than the count in source/sink table.
- ErrorCode=UserErrorInvalidColumnMappingColumnNotFound,Column 'xxx' specified in column mapping cannot be found in source data.
- The path 'xxx' specified in the add operation already exists. Please specify a new path
- Cannot create Sql Source. Error: The value of the property 'Value' is invalid for the stored procedure parameter 'XXX'
- Cannot connect to SQL Database:'XXX' . Verify that the instance name is correct
- Cannot open server 'xxx' requested by the login. Client with IP address 'x.x.x.x' is not allowed to access the server