Bicep error code - BCP062

This error occurs when the referenced declaration has an error.

Error description

The referenced declaration with name <type-name> is not valid.

Examples

The following example raises the error because the referenced user-defined data type has an error:

type ball = object.bar

output tennisBall ball = {
  name: 'tennis'
  color: 'yellow'
}

You can fix the error by fixing the ball definition:

type ball = object

output tennisBall ball = {
  name: 'tennis'
  color: 'yellow'
}

Next steps

For more information about Bicep error and warning codes, see Bicep core diagnostics.