Skip to content

Commit 84f1256

Browse files
committed
fix: update error code to BadRequestErr in HandleAppStart and add corresponding constant
1 parent ef6c2de commit 84f1256

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

internal/api/handlers/app_start.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ func HandleAppStart(
6565
err = app.ValidateBricks(appLoaded.Descriptor, bricksIndex)
6666
if err != nil {
6767
sseStream.SendError(render.SSEErrorData{
68-
Code: render.InternalServiceErr,
68+
Code: render.BadRequestErr,
6969
Message: err.Error(),
7070
})
71+
return
7172
}
7273

7374
type progress struct {

internal/render/sse.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type SSEErrCode string
3030

3131
const (
3232
InternalServiceErr SSEErrCode = "INTERNAL_SERVER_ERROR"
33+
BadRequestErr SSEErrCode = "BAD_REQUEST_ERROR"
3334
)
3435

3536
type SSEErrorData struct {

0 commit comments

Comments
 (0)