How to use the boom.notImplemented function in boom

To help you get started, we’ve selected a few boom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / x-pack / plugins / reporting / export_types / csv_from_savedobject / server / create_job / create_job.ts View on Github external
kibanaSavedObjectMeta: kibanaSavedObjectMetaJSON,
        } = attributes as SavedSearchObjectAttributesJSON;
        const { timerange } = req.payload as { timerange: TimeRangeParams };

        if (!kibanaSavedObjectMetaJSON) {
          throw new Error('Could not parse saved object data!');
        }

        const kibanaSavedObjectMeta = {
          ...kibanaSavedObjectMetaJSON,
          searchSource: JSON.parse(kibanaSavedObjectMetaJSON.searchSourceJSON),
        };

        const { visState: visStateJSON } = attributes as VisObjectAttributesJSON;
        if (visStateJSON) {
          throw notImplemented('Visualization types are not yet implemented');
        }

        // saved search type
        return await createJobSearch(timerange, attributes, references, kibanaSavedObjectMeta);
      })
      .catch((err: Error) => {
github Streampunk / beamengine / lib / routes.js View on Github external
async function formatUpdate (ctx) {
  console.log(ctx.params);
  throw Boom.notImplemented('Updating formats is not yet implemented.');
}
github node-tastypie / tastypie / lib / resource / detail.js View on Github external
, remove_object: function( bundle, callback ){
    var e = Boom.notImplemented('method remove_object not implemented');
    e = annotate( e, bundle );
    setImmediate( callback, e, null );
  }
github node-tastypie / tastypie / lib / resource / list.js View on Github external
, create_object: function create_object( bundle, callback ){
    var e = Boom.notImplemented( "create_object is not implemented" );
    setImmediate(callback, annotate( e, bundle ) );
  }
github JKHeadley / rest-hapi / api / token / token.handlers.js View on Github external
delete: function (request, reply) {
      //TODO
      reply(Boom.notImplemented("This needs to be implemented."));
    }
  };
github robertpallas / generator-hapi-plus / generators / app / templates / routes / examples / db / postgreExample.js View on Github external
handler: (request, reply) => {
        if(!request.db) {
            reply(Boom.notImplemented('PostgreSql not added'));
        } else {
            request.db.query('select now()').then(reply).catch((err) => {
                request.log(['error'], err);
                reply(Boom.badImplementation('No time'));
            });
        }
    }
};
github mdibaiee / hapi-sequelize-crud / src / utils.js View on Github external
const getModels = (request) => {
  const noGetDb = typeof request.getDb !== 'function';
  const noRequestModels = !request.models;
  if (noGetDb && noRequestModels) {
    return notImplemented('`request.getDb` or `request.models` are not defined.'
                   + 'Be sure to load hapi-sequelize before hapi-sequelize-crud.');
  }

  const { models } = noGetDb ? request : request.getDb();

  return models;
};
github node-tastypie / tastypie / lib / resource / detail.js View on Github external
, replace_object: function replace_object( bundle, callback ){
    var e = Boom.notImplemented("method replace_object not implemented");
    e = annotate(e, bundle);
    setImmediate( callback, e, null );
  }
github WorldBank-Transport / ram-backend / app / routes / scenarios--files-download.js View on Github external
handler: (request, reply) => {
      if (!request.query.download) {
        return reply(Boom.notImplemented('Query parameter "download" missing'));
      }

      db('scenarios_files')
        .select('*')
        .where('id', request.params.fileId)
        .where('project_id', request.params.projId)
        .where('scenario_id', request.params.scId)
        .then(res => {
          if (!res.length) throw new FileNotFoundError();
          return res[0];
        })
        .then(file => {
          return getFile(file.path)
            .then(dataStream => {
              let mime;
              switch (file.type) {