Return an error with a json format, becuase the error doesn't happen on a HTTP layer.