Skip to content

Commit

Permalink
go back to error field
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed May 16, 2024
1 parent 339e2fa commit 42de3fb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ func (e *EgressInfo) UpdateStatus(status livekit.EgressStatus) {
func (e *EgressInfo) SetLimitReached() {
now := time.Now().UnixNano()
e.Status = livekit.EgressStatus_EGRESS_LIMIT_REACHED
e.Details = MsgLimitReached
e.Error = MsgLimitReached
e.ErrorCode = int32(http.StatusRequestEntityTooLarge)
e.UpdatedAt = now
e.EndedAt = now
}

func (e *EgressInfo) SetAborted(msg string) {
now := time.Now().UnixNano()
e.Status = livekit.EgressStatus_EGRESS_ABORTED
if e.Details == "" {
e.Details = msg
} else {
e.Details = e.Details + "; " + msg
}
e.Error = msg
e.ErrorCode = int32(http.StatusPreconditionFailed)
e.UpdatedAt = now
e.EndedAt = now
}
Expand Down

0 comments on commit 42de3fb

Please sign in to comment.