Skip to content

Field naming inconsistency #579

@Synchro

Description

@Synchro

In the spec itself, the feature that triggered the report is documented as featureId. Other fields are similarly camel-cased. However, the additional docs uses featureId as well, but other fields are snake-cased (like line_number).

I've configured reporting using Chrome Canary 143, and it delivers real reports that do not contain a featureId field at all, but a policyId field instead. The other fields are snake-cased, apart from source file which appears twice, once as source_file and once as sourceFile! Here's a real report body, as delivered to report-uri.com (which looks like it removes the outer Report-To elements):

{
    "columnNumber": 23,
    "lineNumber": 2,
    "message": "Permissions policy violation: Geolocation access has been blocked because of a permissions policy applied to the current document. See https://crbug.com/414348233 for more details.",
    "policyId": "geolocation",
    "sourceFile": "https://neo.hakr.site/js/permissions.js",
    "url": "https://neo.hakr.site/reporting.php",
    "source_file": "https://neo.hakr.site/js/permissions.js"
}

policyId does not appear anywhere in this repo, yet that appears to be what browsers have implemented! Similarly, the url property isn't in the spec for the report body, though it should appear in the outer report-to structure.

Consequently, I'm really not sure what I should be implementing; it's all very confused!

It would be good to know what @ScottHelme sees in actual reports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions