Added exception when samlib returns 500 error