< Return to Summary | File Generated: Wed Feb 28 2024 15:23:13 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.


✅ 2 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 308.658617ms.

{
  "@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 39.39487ms.

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

Specs