With errors being serialized, this `before_serializer` hook now gets called twice. The first time is to serialize the result of the `get '/json'` route in the app (an arrayref). The second time its called is when the error is serialized, the default error content when a serializer is set is a hashref.