< Return to Summary | File Generated: Tue Apr 16 2024 11:52:21 GMT+0000 (Coordinated Universal Time)

common-error-conditions >> unknown-endpoint

Booking Flow:

Opportunity Type:

Feature: Core / Common error conditions (Implemented)

Test: Expect an UnknownOrIncorrectEndpointError for requests to unknown endpoints

Send a request to an endpoint that does not exist, and expect an UnknownOrIncorrectEndpointError to be returned

Running only this test

npm start -- --runInBand test/features/core/common-error-conditions/implemented/unknown-endpoint-test.js

Is this test failing?

The OpenActive Reference Implementation test result for this test can be used as a reference to help with debugging.


✅ 3 passed with 0 failures, 0 warnings and 0 suggestions


✅ Unknown Endpoint - JSON PUT

UnknownEndpoint Request

PUT https://localhost:5001/api/openbooking/ordeeeeers/abc

{
  "hi": "there"
}

Response status code: 404 Not Found. Responded in 92.506953ms.

{
  "@context": "https://openactive.io/",
  "@type": "UnknownOrIncorrectEndpointError",
  "name": "The Booking System has no endpoint matching the one requested.",
  "statusCode": 404
}

Specs

✅ Unknown Endpoint - GET

UnknownEndpoint Request

GET https://localhost:5001/api/openbooking/ordeeeeers/abc


Response status code: 404 Not Found. Responded in 24.552954ms.

{
  "@context": "https://openactive.io/",
  "@type": "UnknownOrIncorrectEndpointError",
  "name": "The Booking System has no endpoint matching the one requested.",
  "statusCode": 404
}

Specs