Return error with callback, as throwing does not work outside of
promises