Skip to content

/management APIs return excess Error attributes #23

Description

@RReverser

As per Management API docs, unlike the device Alpaca API, those endpoints are not supposed to return ErrorNumber and ErrorMessage properties.

However, the simulator currently does. E.g. this is the output for http://localhost:32323/management/v1/configureddevices:

{
    "Value": [
        {
            "DeviceName": "Alpaca Camera Sim",
            "DeviceType": "Camera",
            "DeviceNumber": 0,
            "UniqueID": "9244f002-d9bb-415c-a72c-740de130352f"
        },
        {
            "DeviceName": "Alpaca CoverCalibrator Simulator",
            "DeviceType": "CoverCalibrator",
            "DeviceNumber": 0,
            "UniqueID": "5194e0dd-8b5e-4da4-95af-a33bca177f5d"
        },
        {
            "DeviceName": "Alpaca Dome Simulator",
            "DeviceType": "Dome",
            "DeviceNumber": 0,
            "UniqueID": "0f2b36e0-5d12-4677-b06a-0a8405bd090f"
        },
        {
            "DeviceName": "Alpaca Filter Wheel Simulator",
            "DeviceType": "FilterWheel",
            "DeviceNumber": 0,
            "UniqueID": "b5b6feef-f3c6-4f25-8455-0f21b92cb152"
        },
        {
            "DeviceName": "Alpaca Focuser Simulator",
            "DeviceType": "Focuser",
            "DeviceNumber": 0,
            "UniqueID": "c9bcdd5b-e66b-4708-a007-d186ce1db4a0"
        },
        {
            "DeviceName": "Alpaca Observing Conditions Simulator",
            "DeviceType": "ObservingConditions",
            "DeviceNumber": 0,
            "UniqueID": "85c5bbf3-4ea6-42a4-be37-c889b006b7f4"
        },
        {
            "DeviceName": "Alpaca Rotator Simulator",
            "DeviceType": "Rotator",
            "DeviceNumber": 0,
            "UniqueID": "04749800-5b7d-4428-86a1-95a6b82e99c0"
        },
        {
            "DeviceName": "Alpaca Safety Monitor Simulator",
            "DeviceType": "SafetyMonitor",
            "DeviceNumber": 0,
            "UniqueID": "92c20845-01b0-4cb3-ab39-03ee096e32e3"
        },
        {
            "DeviceName": "Alpaca Switch Simulator",
            "DeviceType": "Switch",
            "DeviceNumber": 0,
            "UniqueID": "50f0238c-f0cd-4f98-b3e9-aaaa18ec5e29"
        },
        {
            "DeviceName": "Alpaca Telescope Simulator",
            "DeviceType": "Telescope",
            "DeviceNumber": 0,
            "UniqueID": "fc1534af-2248-4a65-82ae-8258910f12e9"
        }
    ],
    "ClientTransactionID": 0,
    "ServerTransactionID": 94400,
    "ErrorNumber": 0,
    "ErrorMessage": ""
}

They are not technically harmful, of course - any deserializer should ignore them, at most storing a debug log about unused properties - but they do give a wrong impression about those APIs potentially returning Alpaca error codes, which is not ideal for sort of a reference server implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions