Skip to content

[Chore] imageService.js — 201 Created 상태코드 미처리 #10

Description

@dongmin0204

문제

이미지 생성 성공 판단을 status === 200으로만 하고 있어 백엔드가 201을 반환하도록 변경될 경우 성공 처리가 깨짐.

원인

  • src/services/imageService.js:69: response.status === 200 만 확인
  • 현재 백엔드 ContainerImageControllerResponseEntity.ok() (200) 반환 중이라 당장은 문제없음
  • REST 표준상 리소스 생성은 201이 맞으므로 향후 변경 가능성 있음

해결 방안

// 변경 전
if (response.status === 200)

// 변경 후
if (response.status === 200 || response.status === 201)

심각도

낮음 — 현재는 문제없으나 백엔드 변경 시 버그 발생

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions