@@ -19,6 +19,7 @@ package fabric
1919import (
2020 "context"
2121 "fmt"
22+ "net/http"
2223 "strconv"
2324 "strings"
2425
@@ -137,7 +138,7 @@ func (s *streamManager) deleteEventStream(ctx context.Context, esID string, okNo
137138 SetContext (ctx ).
138139 Delete ("/eventstreams/" + esID )
139140 if err != nil || ! res .IsSuccess () {
140- if okNotFound && res .StatusCode () == 404 {
141+ if okNotFound && res .StatusCode () == http . StatusNotFound {
141142 return nil
142143 }
143144 return ffresty .WrapRestErr (ctx , res , err , coremsgs .MsgFabconnectRESTErr )
@@ -162,7 +163,7 @@ func (s *streamManager) getSubscription(ctx context.Context, subID string, okNot
162163 SetResult (& sub ).
163164 Get (fmt .Sprintf ("/subscriptions/%s" , subID ))
164165 if err != nil || ! res .IsSuccess () {
165- if okNotFound && res .StatusCode () == 404 {
166+ if okNotFound && res .StatusCode () == http . StatusNotFound {
166167 return nil , nil
167168 }
168169 return nil , ffresty .WrapRestErr (ctx , res , err , coremsgs .MsgFabconnectRESTErr )
@@ -261,7 +262,7 @@ func (s *streamManager) deleteSubscription(ctx context.Context, subID string, ok
261262 SetContext (ctx ).
262263 Delete ("/subscriptions/" + subID )
263264 if err != nil || ! res .IsSuccess () {
264- if okNotFound && res .StatusCode () == 404 {
265+ if okNotFound && res .StatusCode () == http . StatusNotFound {
265266 return nil
266267 }
267268 return ffresty .WrapRestErr (ctx , res , err , coremsgs .MsgFabconnectRESTErr )
0 commit comments