• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

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

23.07.31 17:58 작성 조회수 1.23k

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

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