desec-stack icon indicating copy to clipboard operation
desec-stack copied to clipboard

Record Content Parser Error Message Unspecific

Open nils-wisiol opened this issue 3 years ago • 0 comments

When trying to create an MX record with record content 10 $url., which deSEC consideres invalid, the error message is less specific than it should be:

http POST https://desec.io/api/v1/domains/parse-test.dedyn.io/rrsets/ \
    Authorization:"Token $TOKEN" subname="" type="MX" \
    records:='["10 $url."]' ttl:=300 
HTTP/1.1 400 Bad Request
# [...]

{
    "non_field_errors": [
        "Cannot parse record contents: invalid exchange: \\$url."
    ]
}

Specifically, the error should be a records error and not a non_field_error.

nils-wisiol avatar Mar 16 '22 10:03 nils-wisiol