Skip to content

Commit

Permalink
Give several suggestions for a user, who got the data push error. (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
AcckiyGerman committed Feb 13, 2018
1 parent 54d937d commit 750f8f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/data-push.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {validateMetadata} = require('datahub-client').validate

// Ours
const {customMarked} = require('../lib/utils/tools.js')
const {handleError} = require('../lib/utils/error')
const {error, handleError} = require('../lib/utils/error')
const wait = require('../lib/utils/output/wait')
const info = require('../lib/utils/output/info.js')

Expand Down Expand Up @@ -64,9 +64,11 @@ Promise.resolve().then(async () => {
try {
dataset = await Dataset.load(filePath)
} catch(err){
console.error('Error: '+err.message)
info("You can run 'data init' to create a datapackage.")
info("You can run 'data help push' to get more info.")
error(err.message)
info("You can run:")
info("'data validate' to check your data.")
info("'data init' to create a datapackage.")
info("'data help push' to get more info.")
process.exit(1)
}
} else {
Expand Down

0 comments on commit 750f8f9

Please sign in to comment.