Error 400 from Aspose.Words since 10:30AM 15 May

Com.Aspose.Words.ApiException
HResult=0x80131500
Message=The remote server returned an error: (400) Bad Request.
Source=Aspose.Words-Cloud
StackTrace:
at Com.Aspose.Words.Api.WordsApi.GetDocumentWithFormat(String name, String format, String storage, String folder, String outPath)

@itaccounts

The error you are encountering, “Error 400 Bad Request,” typically indicates that there is an issue with the request being sent to the Aspose.Words API. This can happen for several reasons, such as:

  1. Invalid Document Name: Ensure that the document name you are using in the GetDocumentWithFormat method is correct and that the document exists in the specified storage location.

  2. Incorrect Format: Verify that the format you are requesting is supported by the API. For example, if you are trying to convert a document to a format that is not supported, it will result in a bad request.

  3. Storage and Folder Parameters: Check that the storage and folder parameters are correctly specified. If the document is not located in the default storage or folder, you need to provide the correct path.

  4. API Configuration: Ensure that your API client is correctly configured with valid credentials and that you are using the correct endpoint.

Here is a sample code snippet that demonstrates how to use the GetDocumentWithFormat method correctly:

var request = new GetDocumentWithFormatRequest(
    name: "YourDocumentName.docx", // Ensure this document exists
    format: "pdf", // Specify a valid format
    storage: "YourStorageName", // Specify your storage if needed
    folder: "YourFolderName", // Specify the folder if needed
    outPath: null // Specify an output path if needed
);

try
{
    var response = await wordsApi.GetDocumentWithFormat(request);
    // Process the response
}
catch (ApiException ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Make sure to replace "YourDocumentName.docx", "pdf", "YourStorageName", and "YourFolderName" with your actual document name, desired format, storage name, and folder name, respectively.

If you continue to experience issues, please double-check the parameters you are passing to the API and ensure that the document is accessible in the specified location.

This issue was fixed yesterday evening. Are you still getting this error?

Yes, we are. It is affecting production

Please share your client id

Account: [itaccounts]
ID: 1400b052-8734-4879-bed5-5ce8b5f43ea0

I see, you use v1.1 version. I will reach out the responsible team why is that offline.

Thank you. It has gone beyond 25 hours now

I’ve been told that now it is working, could you check please?

I tried now. Still not working.
The remote server returned an error: (400) Bad Request.

Please let me know if I should try anything else?

I will reach out to you, as we get more information.

It is strange but I can’t find any GetDocumentWithFormat request from client id you shared since yesterday, but there are many requests to mailmerge that are works fine.

The Aspose.Words-Cloud.dll we’re using has a runtime version of v2.0.50727.
Can you please redeploy the containers?

The last time we ran into this error, this is what you did to assist:

’ We have redeployed the fresh containers for API Version 1.1. Please check now, It should work now.’

I asked them to redeploy, waiting for their action.

Hi Yaroslaw. Have you had any update?

As I said I wrote them with the question about restarting. But I haven’t received answer yet.

I’ve been told that 1.1 version is alive now.