Odd behavior on API Endpoints

I’ve had some fairly consistent problems with editing API endpoints. I’ll have a version of it working and I’ll find that sometimes the output debugger shows the following. It can even change the editor to write-host “hello world” and it’ll do the same thing. Any thoughts on how to fix? Only way I’ve found is to completely delete the endpoint and start from scratch.

Note:

  • It also happens with GET verbs
    The actual API appears to work, but troubleshooting with the output screen stops

Editor


New-PSUEndpoint -Url "/validateremediation" -Method "POST" -Endpoint {
$Fields = $Body | ConvertFrom-Json
$netid = $fields.NetID
$aduser = get-aduser $netid
if ($aduser)
{
     New-PSUValidationResult -Success
}
else 
{
     New-PSUValidationResult -ErrorMessage 'Incorrect name'
}
}

Output

<!doctype html><html><head><base href="/"><meta charset="utf-8"/><meta name="ud-dashboard" content="1"><meta name="viewport" content="width=device-width,initial-scale=1"><title>PowerShell Universal Dashboard</title><style>.v-wrap{
            height: 100% !important;
            white-space: nowrap !important;
            text-align: center !important;
            display: block !important;
            min-height: auto !important;
            flex-direction: row !important;
        }
        .v-wrap:before{
            content: "";
            display: inline-block;
            vertical-align: middle;
            width: 0;
            /* adjust for white space between pseudo element and next sibling */
            margin-right: -.25em;
            /* stretch line height */
            height: 100vh; 
        }
        .v-box{
            display: inline-block;
            vertical-align: middle;
            white-space: normal;
        }</style><link rel="icon" href="favicon.ico"><script defer="defer" src="index.32deabba34051bec101f.bundle.js"></script></head><body style="margin:0"><div id="app" class="app"/></body></html>
Product: PowerShell Universal (IIS)
Version: 2.12.5