Bitbucket src API not working with format=meta when the file or branch specified in the request do not exist

Issue #14466 new
Gabriel Titerlea
created an issue

When making a request to the src api [1] if the request is done without the format=meta flag the request works even if the branch or file specified in the request do not exist. A relevant error message is returned with a 404 status code.

When the same request is performed but with the format=meta flag set the response code is 500 and an html page is returned.

Relevant 500 response code from the html file: 80ea664a55844456a9366acf7ce19449

[1] https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/src#get