Skip to content

Add metadata to configuration exceptions #27728

@DaveCTurner

Description

@DaveCTurner

... instead of using headers.

Similarly to #27724, there is some exception metadata that is included in headers rather than using addMetadata(), introduced in #19318.

if (processorType != null) {
exception.addHeader("processor_type", processorType);
}
if (processorTag != null) {
exception.addHeader("processor_tag", processorTag);
}
if (propertyName != null) {
exception.addHeader("property_name", propertyName);
}

Under the umbrella of #27672, it'd be preferable to use addMetadata() to reduce the number of ways that clients have to handle errors.

/cc @simonw and @talevy for further opinions.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions