Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more API responses #143

Merged
merged 10 commits into from
Jul 4, 2024

Conversation

JeroenVdb
Copy link
Contributor

Some calls respond with other response codes then we already check. I checked the API docs and added all possible responses.

I also output the complete body response, it contains helpful error codes. For example:

{
  "code": "GATEWAY_DEVICE_MISSING",
  "message": "Could not find gateway device"
}

Docs: https://developer.cloud.daikineurope.com/spec/b0dffcaa-7b51-428a-bdff-a7c8a64195c0/70b10aca-1b4c-470b-907d-56879784ea9c#/info/get_info

Error: Unexpected API error, statusCode: 204
    at OnectaClient.requestResource (/Users/jvandenberghe/Projects/homebridge-daikin-cloud/node_modules/daikin-controller-cloud/src/onecta/oidc-client.ts:160:23)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at daikinAirConditioningAccessory.handleRotationSpeedSet (/Users/jvandenberghe/Projects/homebridge-daikin-cloud/src/daikinAirConditioningAccessory.ts:242:13)

Jeroen Van den Berghe and others added 10 commits September 13, 2023 09:48
* origin/main:
  Bump openid-client from 5.6.4 to 5.6.5 (Apollon77#133)
  Bump follow-redirects from 1.15.4 to 1.15.6 (Apollon77#132)
  Bump jose from 4.15.4 to 4.15.5 (Apollon77#130)
  Update README.md (Apollon77#129)
  Bump openid-client from 5.6.2 to 5.6.4 (Apollon77#126)
  Bump follow-redirects from 1.15.3 to 1.15.4 (Apollon77#125)
  Bump openid-client from 5.6.1 to 5.6.2 (Apollon77#124)
  * dep updates
  Bump @alcalzone/release-script from 3.6.0 to 3.7.0 (Apollon77#122)

# Conflicts:
#	package-lock.json
#	package.json
* origin/main:
  Changelog
  ts no semantic versioning and build
  Re-indent files
  Switches to Daikin's Onecta API, ports to Typescript (Apollon77#139)
* origin/main:
  chore: release v2.0.0-alpha.1
  gha
  Changelog and license year
  Alpha1 Preparations (Apollon77#140)
  Bump braces from 3.0.2 to 3.0.3 (Apollon77#135)
  Bump actions/checkout from 3 to 4 (Apollon77#119)
  Bump actions/setup-node from 3 to 4 (Apollon77#121)
* origin/main:
  chore: release v2.0.0-alpha.7
  make server data optional
  chore: release v2.0.0-alpha.6
  fix
  chore: release v2.0.0-alpha.5
  readme
  Throw on non-200 status codes (Apollon77#142)
  chore: release v2.0.0-alpha.4
  readme
  fixes 'OPError: invalid_request (Refresh Token is missing)' due to a regression introduced by snake_case -> camelCase conversion (Apollon77#141)
  chore: release v2.0.0-alpha.3
  Update all devices together and update event
  chore: release v2.0.0-alpha.2
  retweak readme
  gha concurrency
  no tokensaver anymore
  Optimize types/exports, add content type for set
@JeroenVdb
Copy link
Contributor Author

@Apollon77 Apollon77 merged commit 00072d3 into Apollon77:main Jul 4, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants