-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
testsImprovements or additions to test-definitionsImprovements or additions to test-definitions
Description
Hi Team,
While reviewing the retrieveLocation API behavior, we noticed a potential discrepancy between the YAML specification and our current Gherkin scenario for devices that cannot be located:
Current Gherkin scenario:
- Device exists but cannot be located (@location_retrieval_404_unable_to_locate_device)
- maxAge is not included
- Expected response: 404 / LOCATION_RETRIEVAL.DEVICE_NOT_FOUND
YAML specification:
- Absence of maxAge means “any age” is acceptable (i.e., last known location)
- If the system cannot provide location, the response should be 422 / LOCATION_RETRIEVAL.UNABLE_TO_LOCATE
Analysis:
- 404 should be returned only if the device does not exist or is invalid.
- 422 is more appropriate if the device exists but the system cannot retrieve its location.
- Therefore, for a valid device with maxAge missing, and location unavailable, the API should return 422 / UNABLE_TO_LOCATE, not 404.
Suggested Action:
- Update the Gherkin scenario to expect 422 / LOCATION_RETRIEVAL.UNABLE_TO_LOCATE for existing devices.
- Keep 404 reserved for truly non-existent devices.
This will align the test cases with the YAML spec and standard REST semantics.
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testsImprovements or additions to test-definitionsImprovements or additions to test-definitions