/**
 * This error is used internally to signal when the `AddonAttachmentResolver` cannot resolve
 * to a single attachment.
 */
export class AmbiguousError extends Error {
    matches;
    type;
    body;
    message;
    statusCode = 422;
    constructor(matches, type) {
        super();
        this.matches = matches;
        this.type = type;
        this.message = `Ambiguous identifier; multiple matching add-ons found: ${matches.map(match => match.name).join(', ')}.`;
        this.body = { id: 'multiple_matches', message: this.message };
    }
}
