fix: prevent unnecessary error handling in export download endpoint

Adds an early return after handling bad request errors in the GetExportDownload function to avoid unnecessary error processing and improve error handling clarity.
This commit is contained in:
Marvin Zhang
2025-02-17 16:27:39 +08:00
parent 3106347fe9
commit 3237923f02

View File

@@ -68,6 +68,7 @@ func GetExportDownload(c *gin.Context) {
exp, err = export.GetJsonService().GetExport(exportId)
default:
HandleErrorBadRequest(c, errors.New(fmt.Sprintf("invalid export type: %s", exportType)))
return
}
if err != nil {
HandleErrorInternalServerError(c, err)