Skip to content

Function Returns Response Code 406 #105

@dmbaio

Description

@dmbaio

The function runtime compiled using the most recent pull requests and function app version change commit no longer returns a success code of 200 to the service hook in Azure DevOps. It appears that line 83 of AzureFunctionHandler.cs is the issue:
return req.CreateResponse(HttpStatusCode.OK, execResult);

The tooltip states that if no formatter is found then CreateResponse will return 406: Not Acceptable, which is what ends up being returned to the service hook which interprets it as having failed. Changing the line as seen here fixes the issue:
return req.CreateResponse(HttpStatusCode.OK);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedBug got fixed or found a solution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions