Skip to content

Commit

Permalink
Fix errors to log in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Jul 21, 2024
1 parent 78886cc commit 097eca5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/api/src/base/Init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {

metadataVersion = versions.reduce((largest, current) => current.gt(largest) ? current : largest);
} catch (e) {
l.warn(`error with state_call::Metadata_metadata_versions, rpc::state::get_metadata will be used: ${(e as Error).message}`);
l.debug((e as Error).message);
l.warn('error with state_call::Metadata_metadata_versions, rpc::state::get_metadata will be used');
}

if (metadataVersion) {
Expand All @@ -432,7 +433,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
return new Metadata(this.registry, opaqueMetadata.toHex());
}
} catch (e) {
l.warn(`error with state_call::Metadata_metadata_at_version, rpc::state::get_metadata will be used: ${(e as Error).message}`);
l.debug((e as Error).message);
l.warn('error with state_call::Metadata_metadata_at_version, rpc::state::get_metadata will be used');
}
}

Expand Down

0 comments on commit 097eca5

Please sign in to comment.