better error from react