Skip to content

errors.Is does not work properly with NCError #8

@minlau

Description

@minlau

std library function errors.Is does not work when error is created with NCError

create error:

ErrAzureEABillingConfigNotFound      = errors.New("Azure EA billing config not found", nil)

error check fails:

if errors.Is(err, billingcfg.ErrAzureEABillingConfigNotFound) {
    c.JSON(http.StatusNotFound, internalErrorToResponse(err))
    
    return
}

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