pw_error helper