text: 'use strict';
  
  /**
   * Handles resouce not found error
   * @module 404 error
   */
  
  const QClient = require('@nmq/q/client');
  
  module.exports = (req,res,next) => {
    let error = { error: 'Resource Not Found' };
    res.statusCode = 404;
    res.statusMessage = 'Not Found';
    res.setHeader('Content-Type', 'application/json');
    res.write(JSON.stringify(error));
    res.end();
    QClient.publish('database', 'db-error', error);
  };