0

API - PATCH request to update the profile returns 500

Hi,

 

The PATCH request to update the profile is returning a 500 error.

{
"errors": [
{
"code": "internalServerError"
}
]
}

It was working fine until 2 days ago. However, when we remove the "parentalControl.recreation" from the request body, it works fine. Was there any update to the API in the past 2 days?

https://api.nextdns.io/profiles/:id

Request Body:

{
    "security": {
        "threatIntelligenceFeeds": false,
        "aiThreatDetection": false,
        "googleSafeBrowsing": false,
        "cryptojacking": false,
        "dnsRebinding": false,
        "idnHomographs": false,
        "typosquatting": false,
        "dga": false,
        "nrd": false,
        "ddns": false,
        "parking": false,
        "csam": false,
        "tlds": []
    },
    "privacy": {
        "disguisedTrackers": false,
        "allowAffiliate": false,
        "blocklists": [],
        "natives": []
    },
    "parentalControl": {
        "safeSearch": false,
        "youtubeRestrictedMode": true,
        "blockBypass": false,
        "services": [],
        "categories": [
            {
                "id": "porn",
                "recreation": false,
                "active": false
            },
            {
                "id": "gambling",
                "recreation": false,
                "active": false
            },
            {
                "id": "dating",
                "recreation": false,
                "active": false
            },
            {
                "id": "piracy",
                "recreation": false,
                "active": false
            },
            {
                "id": "gaming",
                "recreation": false,
                "active": false
            }
        ],
        "recreation": {
            "times": {},
            "timezone": null
        }
    },
    "settings": {
        "logs": {
            "enabled": false,
            "drop": {
                "ip": false,
                "domain": false
            },
            "retention": 7776000,
            "location": "us"
        },
        "blockPage": {
            "enabled": false
        },
        "performance": {
            "ecs": false,
            "cacheBoost": false,
            "cnameFlattening": false
        },
        "web3": false
    },
    "denylist": [],
    "allowlist": []
}

2 replies

null
    • Alexandre_Malucelli
    • 10 mths ago
    • Reported - view

    I'm also getting the same type of issue.

    When I try to update the parent control settings with all the others, like categories and services, I get this internal error:

    [DEBUG] REQUEST: Method:PATCH, URL:https://api.nextdns.io/profiles/x/parentalControl, Body:{"services":[{"id":"tinder","active":true,"recreation":false}],"categories":[{"id":"dating","active":true,"recreation":true}],"recreation":{"times":{"monday":{"start":"00:00","end":"23:59"},"tuesday":{"start":"00:00","end":"23:59"},"wednesday":{"start":"00:00","end":"23:59"},"thursday":{"start":"00:00","end":"23:59"},"friday":{"start":"00:00","end":"23:59"},"saturday":{"start":"00:00","end":"23:59"},"sunday":{"start":"00:00","end":"23:59"}},"timezone":"America/Sao_Paulo"},"safeSearch":true,"youtubeRestrictedMode":false,"blockBypass":true}
    [DEBUG] RESPONSE: StatusCode:500, Body:{"errors":[{"code":"internalServerError"}]}
    

    If I remove just the parent control settings,  everything works:

    [DEBUG] REQUEST: Method:PATCH, URL:https://api.nextdns.io/profiles/x/parentalControl, Body:{"services":[{"id":"tinder","active":true,"recreation":false}],"categories":[{"id":"dating","active":true,"recreation":true}],"safeSearch":true,"youtubeRestrictedMode":false,"blockBypass":true}
    [DEBUG] RESPONSE: StatusCode:204
    

    Now if I remove the categories and services, and try only with the recreation settings, it also works:

    [DEBUG] REQUEST: Method:PATCH, URL:https://api.nextdns.io/profiles/x/parentalControl, Body:{"recreation":{"times":{"monday":{"start":"00:00","end":"23:59"},"tuesday":{"start":"00:00","end":"23:59"},"wednesday":{"start":"00:00","end":"23:59"},"thursday":{"start":"00:00","end":"23:59"},"friday":{"start":"00:00","end":"23:59"},"saturday":{"start":"00:00","end":"23:59"},"sunday":{"start":"00:00","end":"23:59"}},"timezone":"America/Sao_Paulo"},"safeSearch":true,"youtubeRestrictedMode":false,"blockBypass":true}
    [DEBUG] RESPONSE: StatusCode:204
    

    It seems some issue when all settings are enforced.

    • Artem.3
    • 3 mths ago
    • Reported - view

    HI!

    It connected with recreation time block

    remove 

    "recreation": {
                "times": {},
                "timezone": null
            }

    and check again

Content aside

  • Status Confirmed
  • 3 mths agoLast active
  • 2Replies
  • 143Views
  • 3 Following