JohnTigue / tapdancer

Taproom menu system
MIT License
1 stars 1 forks source link

System init: if no pre-existing beers.json things error #5

Open JohnTigue opened 6 years ago

JohnTigue commented 6 years ago

Up to now I've been manually placing in S3 a beers.json. This is used by ChucksProcessorLambda to keep notes between pollings of chuckscd.com so that the system knows what beers it has already seen. This is how date-keg-tapped is determined.

The system should be able to handle a case where no beers.json exists, and handle it as "well, this must be the first run so deal with no beers.json existing."

JohnTigue commented 6 years ago
Example error stack
# beers found in html = 50
getBeersDotJson chain errored NoSuchKey: The specified key does not exist.
main webFetch() catch :NoSuchKey: The specified key does not exist.
Unhandled rejection NoSuchKey: The specified key does not exist.
    at Request.extractError (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/services/s3.js:539:35)
    at Request.callListeners (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:673:14)
    at Request.transition (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request. (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:38:9)
    at Request. (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:675:12)
    at Request.callListeners (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
    at Request.emit (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:673:14)
    at Request.transition (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request. (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:38:9)
    at Request. (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/request.js:675:12)
    at Request.callListeners (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
    at callNextListener (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
    at IncomingMessage.onEnd (/Users/john/jft/gits/brew_picker/node_modules/aws-sdk/lib/event_listeners.js:233:11)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)