@Override
        public Object serializeError(ResultStatus error) {
          return serializer.serializeError(error).toString();
        }
Get a serializer for the given media type.

@param mediaType  the media type

@return the result serializer
ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java