code: func handleV2Error(ctx *web.Context, j *factom.JSON2Request, err *factom.JSONError) {
  	resp := factom.NewJSON2Response()
  	if j != nil {
  		resp.ID = j.ID
  	} else {
  		resp.ID = nil
  	}
  	resp.Error = err
  
  	ctx.WriteHeader(httpBad)
  	ctx.Write([]byte(resp.String()))
  }
docs: // handleV2Error handles the error responses to RPC calls