Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash app when ip is invalid #26

Open
truonghoangnguyen opened this issue Feb 22, 2016 · 2 comments
Open

crash app when ip is invalid #26

truonghoangnguyen opened this issue Feb 22, 2016 · 2 comments

Comments

@truonghoangnguyen
Copy link

I used sailsjs and node-maxmind-db, when ip is invalid, app is crash
code in coffee:

         ip = '113.183.205.64,66.249.82.67';
         mmdbreader.open GEOPATH, (error, countries) ->
           countries.getGeoData ip, (error, geodata) ->
             if error
               sails.log.error 'expected come here'
               return callback true, MessageService.common.system(error)
             sails.log.error geodata

thanks

@chriskinsman
Copy link

We are seeing this also. Instead of calling the callback with an error we instead get a crash.

In our case we were passing 'undefined' as the IP accidentally and it crashed the process due to no out try/catch block.

@knoxcard
Copy link

knoxcard commented Dec 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants