Giter Club home page Giter Club logo

consistency's People

Contributors

dstevensio avatar jbrumwell avatar sharique-hasan avatar toddbluhm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

consistency's Issues

Publish the current master on npm

I just ran into the 500 unhandled exception error that was fixed last January. When comparing the npm code with the current master it appears the current master has fixed this issue, but those fixes never got published to npm. It would be great if you could take a couple seconds to get the current master version published on npm. Thanks ๐Ÿ˜„

If no handler is registered for a version then it gives out 500 error

if any random word is provided for the version and if there were no handler registered in the application for that random word then server was throwing 500 error instead of 404 error.

Error:
TypeError: Uncaught error: handler is not a function
at /home/sharique/path/to/project/node_modules/consistency/lib/handler.js:76:14

I have created a pull request too to solve this issue. #3

Does this works with pre handlers

i organize my api like suggested here outmoded/discuss#66, and im trying to version one or more of the pre handlers however it fails when i attempt something like:

'use strict';

const Handlers = require('./handlers');
const Schema = require('./schema');

const internals = {};

module.exports = [
    {
        method: 'GET',
        path: '/version',
        config: {
            auth: false,
            pre: [
                {
                    method: {
                        versioned: {
                            'v1.0': (request, reply) => { reply('0.0.1'); },
                            'v2.0': (request, reply) => { reply('0.0.2'); }
                        }
                    },
                    assign: 'version'
                }
            ],
            handler: Handlers.version
        }
    }
];

it works well when the versioned is the handler itself

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.