[#node-GetWarningsForRpc]
= xref:node.adoc[node]::GetWarningsForRpc
:relfileprefix: ../
:mrdocs:

RPC helper function that wraps warnings&period;GetMessages()&period;

== Synopsis

Declared in `&lt;node&sol;warnings&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:UniValue.adoc[UniValue]
GetWarningsForRpc(
    xref:node/Warnings.adoc[Warnings] const& warnings,
    bool use&lowbar;deprecated);
----

== Description

Returns a UniValue&colon;&colon;VSTR with the latest warning if use&lowbar;deprecated is set to true, or a UniValue&colon;&colon;VARR with all warnings otherwise&period;

== Return Value

A UniValue string or array holding the active warnings&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *warnings*
| The warnings manager to read messages from&period;
| *use&lowbar;deprecated*
| If true, return only the latest warning as a string&semi; otherwise return all warnings as an array&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
