scd: Handle error correctly.