Fixes /location route to only send a 500 response if there was an error