helper for wsh errors