Fix setting state when build should be canceled

If any of the builds is canceled, the state should be canceled, before
this commit it could be errored, because errored check was before
canceled check.

The fix is sponsored by @joshk's super code reviews :heart: