An unknown error is shown if I try to import a markdown file containing HTML

Hello,

When I try to add the file at appium/packages/appium/docs/en/index.md at master · appium/appium · GitHub Crowdin always return 400 error without any useful description:

Would it be possible to get any guidance on how to fix this file to make it acceptable for the Crowdin’s backend and/or improve the actual error message from the API call with more details?

Hello @appium

It looks like this file can’t be recognized with the default parser.

Have you tried playing around with the parser configuration?

Theoretically, it might also help if you upload with a defined type as let’s say mdx or html?

If none of the proposed help, please share this file in a private message (you can DM me here) or via email (to support@crowdin.com) so I can check from my side what can be done here :slight_smile:

Have you tried playing around with the parser configuration?

I’ve checked the parser config and don’t really see many options there for markdown files that I could change.

Theoretically, it might also help if you upload with a defined type as let’s say mdx or html?

Files upload there is automated and is done through the API. Here is the code responsible for documents upload to storage: docs(appium): Enable the documentation to be translated via Crowdin by mykola-mokhnach · Pull Request #20800 · appium/appium · GitHub
As you can see there, the Content-Type type there is set to text/markdown for all documents there. Shall I change it to text/html?

If none of the proposed help, please share this file in a private message (you can DM me here) or via email (to support@crowdin.com) so I can check from my side what can be done here :slight_smile:

The file is in the public repository and is available to everyone using the above link. Nevertheless, please let me know if you need any additional details to address this issue.

P. S.
Файно дякую

Tried to customize the file type to text/html instead of text/markdown and got the same error while invoking the Add File API :frowning:
Adding it to the storage does not raise any errors though.

Hi @appium one of the tags is not closed

the string should look like this
AppiumConf 2025 is partnering with SeleniumConf
March 26-28 in Valencia, Spain. Join us to learn and connect with the community!

please edit the string in the file and import should go well

Thanks a ton, fixing the HTML closing tag helped to fix the above API call.

It would be cool if the actual error message that the Add File API returns would contain a more specific suggestion. It would save the time for kind community moderator people here.

@appium our team will fix the handling of files like this so by default it should work. We passes this to the team

1 Like