{"record":{"id":"fd1016000d16d676","repo":"moeru-ai/airi","slug":"the-hid-device-is-not-a-standard-dualsense-control","errorCode":null,"errorMessage":"The HID device is not a standard DualSense controller.","messagePattern":"The HID device is not a standard DualSense controller\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/input-playstation-dualsense-5/src/controller.ts","lineNumber":30,"sourceCode":"  constructor(device: HIDDevice) {\n    if (!isDualSenseDevice(device))\n      throw new Error('The HID device is not a standard DualSense controller.')\n\n    this.#device = device\n    this.#connectionType = detectDualSenseConnectionType(device)\n  }","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/moeru-ai/airi/blob/9c213115f8bd0fff9e6eabab02b077ac32da21be/packages/input-playstation-dualsense-5/src/controller.ts#L12-L48","documentation":"DualSenseController's constructor is meant to be constructed only from HID devices that pass isDualSenseDevice (matching vendor/product IDs and a DualSense-shaped report descriptor). The guard throws for any other HIDDevice — e.g. a generic gamepad, a DualShock 4, or a HID device that merely shares the interface — because the report parsing and output-report layouts in this package assume DualSense hardware.","triggerScenarios":"Thrown at packages/input-playstation-dualsense-5/src/controller.ts:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Filter devices with isDualSenseDevice(device) before requesting/constructing, e.g. `devices.filter(isDualSenseDevice)`.","Use the package's request/exported device filter in navigator.hid.requestDevice so only DualSense devices are paired.","If another controller type must be supported, add a dedicated controller class for it rather than reusing DualSenseController."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c213115f8bd0fff9e6eabab02b077ac32da21be","analyzedAt":"2026-09-02T04:27:24.639Z","contentChangedAt":"2026-09-02T04:27:24.639Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}