sgi: Correctly propagate meaningful error values