Skip to content

Date fields throw BadRequest #52

@rebstar6

Description

@rebstar6

Ran the following commands:

client = VinylDNSClient("http://localhost:9000", "xxx", "xxx")
existing_txt = [rs for rs in existing_records.record_sets if rs.type == "TXT"][0]
data_to_add = TXTData("some-test-txt-to-add")
existing_txt.records.append(data_to_add)
existing_txt.records
[<vinyldns.record.TXTData object at 0x102e970f0>, <vinyldns.record.TXTData object at 0x102e53e48>]
updated = client.update_record_set(existing_txt)
Traceback (most recent call last):
File "", line 1, in
File "/Users/rstar201/Desktop/Vinyl/python/vinyldns-python/src/vinyldns/client.py", line 519, in update_record_set
to_json_string(record_set), **kwargs)
File "/Users/rstar201/Desktop/Vinyl/python/vinyldns-python/src/vinyldns/client.py", line 157, in __make_request
return self.__check_response(response)
File "/Users/rstar201/Desktop/Vinyl/python/vinyldns-python/src/vinyldns/client.py", line 164, in __check_response
raise BadRequestError(response.text)
vinyldns.client.BadRequestError: {"errors":["Invalid date format 2019-06-25T16:37:09+00:00"]}

the api doesnt use created/update on an update_recordset call anyway, so i just cleared those fields to avoid it, but we should fix to make sure people dont run into this same issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions