Fixing repetition of 'unless params.include?'
Changing most-recent-error-or-failure to json endpoint