Error: Resource Not Found for /element/{elementId} Endpoint When Accessing Element Attributes

While running my iOS automation tests using Appium, I am trying to retrieve attributes of a UI element (like UID, accessibilityContainer, accessible, focused, frame, hittable, index, label, type, value, visible). However, when I send a request to the endpoint /wd/hub/session/{sessionId}/element/{elementId}/, I receive the following error:

The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

Appium version: 2.4.1
Desktop OS/version used to run Appium: macOS Sonoma
Mobile platform/version under test: iOS 17.2
Real device or emulator/simulator: Simulator

Please provide the full server log

Terminal Log

Would this be sufficient?

Some endpoints from these in the log don’t exist in the spec
Make sure your client uses proper APIs