Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should return 416 when query transmissions with offset parameter and value is over than totalCount #4988

Closed
cherrycl opened this issue Nov 1, 2024 · 0 comments · Fixed by #4995
Assignees
Labels
bug Something isn't working

Comments

@cherrycl
Copy link
Contributor

cherrycl commented Nov 1, 2024

🐞 Bug Report

Affected Services [REQUIRED]

The issue is located in: support-notifications

Is this a regression?

Yes

Description and Minimal Reproduction [REQUIRED]

  1. Deploy service with compose file
  2. Create subscription with following request body
POST http://localhost:59860/api/v3/subscription
[
   {
      "subscription":{
         "name":"Subscription-1730440698634",
         "description":"Test data for subscription",
         "channels":[
            {
               "host":"localhost",
               "port":7770,
               "httpMethod":"POST",
               "type":"REST"
            }
         ],
         "categories":[
            "health-check"
         ],
         "labels":[
            "simple"
         ],
         "receiver":"tafuser",
         "resendLimit":1,
         "resendInterval":"24h",
         "AdminState":"UNLOCKED"
      },
      "apiVersion":"v3"
   }
]
  1. Create notifications with following request body
POST http://localhost:59860/api/v3/notification
[
   {
      "notification":{
         "description":"Test notification data 1730440698644",
         "labels":[
            "simple"
         ],
         "contentType":"string",
         "content":"This is a test notification",
         "sender":"taf-admin",
         "severity":"MINOR",
         "status":"NEW"
      },
      "apiVersion":"v3"
   },
   {
      "notification":{
         "description":"Test notification data 1730440698646",
         "category":"health-check",
         "labels":[
            "simple"
         ],
         "contentType":"string",
         "content":"This is a test notification",
         "sender":"taf-admin",
         "severity":"CRITICAL",
         "status":"NEW"
      },
      "apiVersion":"v3"
   },
   {
      "notification":{
         "description":"Test notification data 1730440698647",
         "category":"no-subscription",
         "labels":[
            "simple"
         ],
         "contentType":"string",
         "content":"This is a test notification",
         "sender":"taf-admin",
         "severity":"NORMAL",
         "status":"NEW"
      },
      "apiVersion":"v3"
   },
   {
      "notification":{
         "description":"Test notification data 1730440698649",
         "category":"health-check",
         "labels":[
            "simple"
         ],
         "contentType":"string",
         "content":"This is a test notification",
         "sender":"taf-admin",
         "severity":"MINOR",
         "status":"NEW"
      },
      "apiVersion":"v3"
   },
   {
      "notification":{
         "description":"Test notification data 1730440698650",
         "category":"health-check",
         "labels":[
            "simple"
         ],
         "contentType":"string",
         "content":"This is a test notification",
         "sender":"taf-admin",
         "severity":"NORMAL",
         "status":"NEW"
      },
      "apiVersion":"v3"
   }
]
  1. Query transmission with API
    GET http://localhost:59860/api/v3/transmission/all?offset=10

🔥 Exception or Error


{
    "apiVersion": "v3",
    "statusCode": 200,
    "totalCount": 4,
    "transmissions": []
}

Expected result: Return status code 416

🌍 Your Environment

Deployment Environment: Ubuntu 2204 / arm64

EdgeX Version [REQUIRED]: Main

Anything else relevant?

@cherrycl cherrycl added the bug Something isn't working label Nov 1, 2024
@github-project-automation github-project-automation bot moved this to New Issues in Technical WG Nov 1, 2024
jinlinGuan added a commit to jinlinGuan/edgex-go that referenced this issue Nov 7, 2024
@github-project-automation github-project-automation bot moved this from Release Backlog to Odessa Done in Technical WG Nov 8, 2024
judehung pushed a commit to IOTechSystems/edgex-go-low-footprint that referenced this issue Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Odessa Done
Development

Successfully merging a pull request may close this issue.

2 participants