createAsyncFunction do not rejecting

i use createAsyncThunk for creating acc in firebase as below. But if i have any kind of error e.g 400 cuz email is invalid or wrong userKey, error is not catching and action is fulfilled not rejected.

export const signup = createAsyncThunk(
  actionTypes.SIGNUP,
  async (form, { rejectWithValue }) => {
    const { username, email, password } = form;
    try {
      const form = {
        email,
        password,
        returnSecureToken: true,
      };
      const url = `it's working :<`;
      const res = await fetch(url, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
        },
        body: JSON.stringify(form),
      });
      const data = await res.json();
    
      return {
        email: data.email,
        userId: data.localId,
        isAuth: true,
      };
    } catch (err) {
      rejectWithValue(err);
    }
  }
);

Thanks for help.