Modifying error handling for resourceId. Closes #24

@MJRodriguezTriana could you plz r&m