build should fail on error
fix status code handling