aac: Make sure to set err on the failure path