Merge pull request #13331 from lafirest/fix/error-msg

fix(api_keys): improved the error message when bootstrapping api_key
This commit is contained in:
zhongwencool 2024-07-03 15:38:44 +08:00 committed by GitHub
commit fe256363ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -357,6 +357,11 @@ init_bootstrap_file(File) ->
init_bootstrap_file(File, Dev, MP);
{error, Reason0} ->
Reason = emqx_utils:explain_posix(Reason0),
FmtReason = emqx_utils:format(
"load API bootstrap file failed, file:~ts, reason:~ts",
[File, Reason]
),
?SLOG(
error,
#{
@ -365,7 +370,8 @@ init_bootstrap_file(File) ->
reason => Reason
}
),
{error, Reason}
{error, FmtReason}
end.
init_bootstrap_file(File, Dev, MP) ->