Skip to content

Commit

Permalink
patch: mocktr181 returns 520 for unsupported commands
Browse files Browse the repository at this point in the history
- mocktr181 currently only supports `set` and `get` commands
  • Loading branch information
denopink committed Jul 16, 2024
1 parent a22907f commit d991dcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/wrphandlers/mocktr181/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ func (h Handler) HandleWrp(msg wrp.Message) error {

default:
// currently only get and set are implemented for existing mocktr181
statusCode = http.StatusOK
statusCode = 520
payloadResponse = []byte(fmt.Sprintf(`{"message": "command %s is not support"}`, command))

Check warning on line 146 in internal/wrphandlers/mocktr181/handler.go

View check run for this annotation

Codecov / codecov/patch

internal/wrphandlers/mocktr181/handler.go#L145-L146

Added lines #L145 - L146 were not covered by tests
}

response := msg
Expand Down

0 comments on commit d991dcc

Please sign in to comment.