Skip to content

Missing message for exceptions thrown in OpenIddictDataSeedContributor #23923

@szilardd

Description

@szilardd

Is there an existing issue for this?

  • I have searched the existing issues

Description

There are 4 BusinessException thrown in OpenIddictDataSeedContributor when there is something missing.

Example:

throw new BusinessException(L["NoClientSecretCanBeSetForPublicApplications"]);

This logs the exception like this - it doesn't log the exception message, because the first argument of the constructor is the exception Code, not the Message.

Unhandled exception. Volo.Abp.BusinessException: Exception of type 'Volo.Abp.BusinessException' was thrown

Should it be changed to this?

throw new BusinessException(message: L["NoClientSecretCanBeSetForPublicApplications"]);

This way the exception would be logged like this:

Unhandled exception. Volo.Abp.BusinessException: NoClientSecretCanBeSetForPublicApplications

The other issue is that there doesn't seem to be a translation set up for these tokens, but at least the token is pretty descriptive.

Thanks

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

9.2.3

User Interface

Angular

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions