인프런 커뮤니티 질문&답변

i1004gy님의 프로필 이미지

작성한 질문수

[리뉴얼] React로 NodeBird SNS 만들기

credentials로 쿠키 공유하기

POST http://localhost:3065/post 500 (Internal Server Error) 500에러 질문 입니다

23.07.31 17:58 작성

·

1.7K

0

redux toolkit을 이용해서 코딩을 하고 있고 credentials까지 강의 나와있는대로 다 작성을 한 상태입니다

post action creator는 이렇게 작성하였고

export const addPost = createAsyncThunk(
  "/post",
  async (data, { fulfillWithValue, rejectWithValue }) => {
    try {
      console.log(data);
      const response = await axios.post("/post", data);
      console.log(response.data);
      return fulfillWithValue(response.data);
    } catch (error) {
      throw rejectWithValue(error.response);
    }
  }
);

에러메시지는

POST http://localhost:3065/post 500 (Internal Server Error)

redux dev tools에 rejected 요청으로 온 여러 정보가 있는데 그중에 뭐가 필요한 정보인지 몰라서 제로초님이 필요하신 정보를 얘기해주시면 추가적으로 추가 하겠습니다

  • status(pin):500

  • statusText(pin):"Internal Server Error"

    일단 이 두개가 상태 메시지입니다

답변 1

0

제로초(조현영)님의 프로필 이미지
제로초(조현영)
지식공유자

2023. 07. 31. 18:07

500에러면 백엔드 터미널에 에러메시지있습니다.

i1004gy님의 프로필 이미지

작성한 질문수

질문하기