Skip to content

Update status code for v1 API disabled#153

Merged
DCSBL merged 1 commit intomainfrom
fix/status-code-disabled-v1-api
Jan 14, 2025
Merged

Update status code for v1 API disabled#153
DCSBL merged 1 commit intomainfrom
fix/status-code-disabled-v1-api

Conversation

@andrea-hw
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Andrea <174331570+andrea-hw@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 48789c1):

https://hw-api-documentation--pr153-fix-status-code-disa-59ztiqsl.web.app

(expires Tue, 21 Jan 2025 10:10:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4accc1c887f1346ec9c563d5645c74c94f610c07

@DCSBL DCSBL changed the title update status code for v1 api disabled Update status code for v1 API disabled Jan 14, 2025
Copy link
Copy Markdown
Collaborator

@DCSBL DCSBL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you double check this with 5.19? Both status codes should match, if not that would be a bug in 6.x instead of incorrect documentation.

@andrea-hw
Copy link
Copy Markdown
Contributor Author

Can you double check this with 5.19? Both status codes should match, if not that would be a bug in 6.x instead of incorrect documentation.

It's 403 in 5.19 as well:

>>> response = requests.get(f"http://192.168.0.100/api")
>>> response.json()
{'product_name': 'P1 Meter', 'product_type': 'HWE-P1', 'serial': '5c2faf1a4840', 'firmware_version': '5.19', 'api_version': 'v1'}
>>> response = requests.get(f"http://192.168.0.100/api")
>>> response.json()
{'error': {'description': 'API not enabled', 'id': 202}}
>>> response.status_code
403

Copy link
Copy Markdown
Collaborator

@DCSBL DCSBL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@DCSBL DCSBL merged commit a342428 into main Jan 14, 2025
@DCSBL DCSBL deleted the fix/status-code-disabled-v1-api branch January 14, 2025 14:18
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