[go: up one dir, main page]

Language API throws 500, if repo is empty

Summary

Use the new Language API in GitLab 10.8. If an empty repository is requested, GitLab just sends HTTP code 500 back, which doesn't make that much sense.

Steps to reproduce

Request the languages of this empty repo with the API

https://gitlab.com/api/v4/projects/6795649/languages

Example Project

https://gitlab.com/api/v4/projects/6795649/languages

What is the current bug behavior?

Error 500 is thrown

What is the expected correct behavior?

JSON that is returned should be empty, because there are no languages in the project.

Relevant logs and/or screenshots

image