Operation on target Copy data failed: Failure happened on 'Source' side

{tocify} $title={Table of Contents}


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 happened at source end


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.
request using postman

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
Azure ADF Source Settings

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.

postman code view

What to do

So now I added the query in the expected format against Request Body  i.e.

                        {"query": "{clients {id}}"}

correct source settings

That's it, all worked fine then after.

Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post