Adding response for non-existent media
Added better exception handling + http responses
Replacing exception codes with http codes
Added check for duplicate media