function checkQuerySizeMiddleware (req, res, next) {
  const query = req.query.query || req.body.query
  const message = 'query size exceeded'
  if (query && query.length > 2000 && !isDevMode) {
    return res.status(500).json({ status: 'error', message })
  }
  next()
}
/**
 * 404 Error Middlware
 *
 * @export
 * @param {Object} req the http request object
 * @param {Object} res the http response object
 * @param {Function} next the next middleware function
 *
 * @returns {Object} the next middleware function
 */
404 Error Middlware
@export
@param {Object} req the http request object
@param {Object} res the http response object
@param {Function} next the next middleware function

@returns {Object} the next middleware function
404 Error Middlware @export @param { Object } req the http request object @param { Object } res the http response object @param { Function } next the next middleware function @returns { Object } the next middleware function
function checkQuerySizeMiddleware (req, res, next) {
  const query = req.query.query || req.body.query
  const message = 'query size exceeded'
  if (query && query.length > 2000 && !isDevMode) {
    return res.status(500).json({ status: 'error', message })
  }
  next()
}
function checkQuerySizeMiddleware ( req , res , next ) { const query = req . query . query || req . body . query const message = 'query size exceeded' if ( query && query . length > 2000 && ! isDevMode ) { return res . status ( 500 ) . json ( { status : 'error' , message } ) } next ( ) }
404 Error Middlware
 @export
 @param {Object} req the http request object
 @param {Object} res the http response object
 @param {Function} next the next middleware function
404 Error Middlware @export @param { Object } req the http request object @param { Object } res the http response object @param { Function } next the next middleware function