Fixed invalid error code on input error

When the request does not contain a model and contains
only binary input the code in case of error is not 400
but 404.
Small refactoring.

SD-246 : Integrate ElasticSearch for media files search

Small refactoring.
Small refactoring.

SD-246 : Integrate ElasticSearch for media files search

Small refactoring.
Small refactoring.

SD-246 : Integrate ElasticSearch for media files search

Small refactoring.