/profile endpoint using https://github.com/bdarnell/plop profiler
fix /profile endpoint error handling based on @pablohoffman and @dangra comments