This should be set outside of the `error != NULL` block.