This is a quick one. I created a new search result page control template for a client. The client deployed it and all was well after they tested it. However when I logged in I got the “something went wrong” message on the result page.
Using Fiddler I noticed an 302 error on the control template .js file, which pointed to _layouts/15/AccessDenied.aspx.
While the file was published and working fine for the person who deployed it in the Master Page Gallery, something had gone wrong. Republishing the file solved the problem and search results are displayed as expected.