From d991dcc3613576eb80b8caf16e678f8f40a7fd8c Mon Sep 17 00:00:00 2001 From: Owen Cabalceta Date: Mon, 15 Jul 2024 22:04:49 -0400 Subject: [PATCH] patch: mocktr181 returns 520 for unsupported commands - mocktr181 currently only supports `set` and `get` commands --- internal/wrphandlers/mocktr181/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/wrphandlers/mocktr181/handler.go b/internal/wrphandlers/mocktr181/handler.go index 1ee5198..c3183ad 100644 --- a/internal/wrphandlers/mocktr181/handler.go +++ b/internal/wrphandlers/mocktr181/handler.go @@ -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)) } response := msg