Bicep error code - BCP166

This error occurs when you have duplicate decorators.

Error description

Duplicate <decorator-name> decorator.

Solutions

Remove the duplicate decorator.

Examples

The following example raises the error because there's two duplicate decorators.

@description('foo')
@description('bar')
param name string

You can fix the error by removing one of the duplicate decorators.

@description('bar')
param name string

For more information, see Decorators.

Next steps

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