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

Handle URL record type #23

Merged
merged 4 commits into from
Mar 18, 2024
Merged

Handle URL record type #23

merged 4 commits into from
Mar 18, 2024

Conversation

mxmehl
Copy link
Owner

@mxmehl mxmehl commented Mar 15, 2024

Fixes #20

Unfortunately, the API seems to be buggy. Changing attributes like urlAppend leads to errors:

[2024-03-15 17:49:19] INFO: [example.com] Update 'URL' record of 'example.com': 'urlAppend' from 'True' to 'False'
[2024-03-15 17:49:19] DEBUG: Resetting dropped connection: api.domrobot.com
[2024-03-15 17:49:19] DEBUG: https://api.domrobot.com:443 "POST /jsonrpc/ HTTP/1.1" 200 None
Request (nameserver.updateRecord): {"method": "nameserver.updateRecord", "params": {"id": 587719457, "urlAppend": 0}}
Response (nameserver.updateRecord): {"code":2306,"msg":"Parameter value policy error","reasonCode":"Error_NothingToUpdate","reason":"There is nothing to update."}
[2024-03-15 17:49:19] ERROR: API call error for 'nameserver.updateRecord' with params '{'id': 587719457, 'urlAppend': 0}': {'code': 2306, 'msg': 'Parameter value policy error', 'reasonCode': 'Error_NothingToUpdate', 'reason': 'There is nothing to update.'}

Changing the urlRedirectType on the other side has no effect. This message appears all the time:

[2024-03-15 17:50:56] INFO: [example.com] Update 'URL' record of 'www.example.com': 'prio' from '301' to '302'
[2024-03-15 17:50:56] INFO: [example.com] Update 'URL' record of 'www.example.com': 'urlRedirectType' from 'HEADER301' to 'HEADER302'
[2024-03-15 17:50:56] DEBUG: [www.example.com] (587719458) urlRedirectTitle equal:  =
[2024-03-15 17:50:56] DEBUG: [www.example.com] (587719458) urlRedirectDescription equal:  =
[2024-03-15 17:50:56] DEBUG: [www.example.com] (587719458) urlRedirectFavIcon equal:  =
[2024-03-15 17:50:56] DEBUG: [www.example.com] (587719458) urlRedirectKeywords equal:  =
[2024-03-15 17:50:56] DEBUG: [www.example.com] (587719458) urlAppend equal: True = True
[2024-03-15 17:50:56] DEBUG: Resetting dropped connection: api.domrobot.com
[2024-03-15 17:50:56] DEBUG: https://api.domrobot.com:443 "POST /jsonrpc/ HTTP/1.1" 200 None
Request (nameserver.updateRecord): {"method": "nameserver.updateRecord", "params": {"id": 587719458, "prio": 302, "urlRedirectType": "HEADER302"}}
Response (nameserver.updateRecord): {"code":1000,"msg":"Command completed successfully"}

@mxmehl mxmehl marked this pull request as ready for review March 18, 2024 15:02
@mxmehl mxmehl merged commit 6d212f0 into main Mar 18, 2024
12 checks passed
@mxmehl mxmehl deleted the url-type branch March 18, 2024 15:04
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.

Properly handle URL record types
1 participant