Theme install endpoint: fixing error handling