How I would convert an excetion or error to json in playframework