[refactor] Fix error checking in core
[refactor] Fix error checking in core

LoRaWanSoFa/ttn,LoRaWanSoFa/ttn,mgranberry/ttn,mgranberry/ttn,mgranberry/ttn,jvanmalder/ttn,jvanmalder/ttn,TheThingsNetwork/ttn,TheThingsNetwork/ttn,jvanmalder/ttn,TheThingsNetwork/ttn