Skip to content

BUG: Import API returns success response even when import status is failed #1

Description

@lyhieunghia

Description

When importing a CSV file with invalid references, the API return:

statusCode: 201
success: true
message: "Import completed successfully"

However, the response data indicates:

status: failed
resultSummary: Reference check failed

This creates inconsistent API behavior.

Image

Affected Endpoints

POST /api/v1/import-logs/students
POST /api/v1/import-logs/majors
POST /api/v1/import-logs/combinations-subjects
POST /api/v1/import-logs/plan-combinations

Expected behavior

If the import fails due to validation or reference errors, the API should:

statusCode: 400
success: false

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions