File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 2222 , handle_call /3
2323 , handle_cast /2
2424 , handle_info /2
25- , format_status /2
25+ , format_status /1
2626 ]).
2727
28+ -if (? OTP_RELEASE < 27 ).
29+ -export ([format_status /2 ]).
30+ -endif .
31+
2832-export ([ start_link /0
2933 , stop /0
3034 , get_credentials /0
@@ -162,9 +166,18 @@ handle_info(Message, State) ->
162166code_change (_Prev , State , _Extra ) ->
163167 {ok , State }.
164168
169+ -spec format_status (gen_server :format_status ()) -> gen_server :format_status ().
170+ format_status (#{reason := _Reason , state := State } = Status ) ->
171+ Status #{state => State # state {credentials = information_redacted }};
172+ format_status (Status ) ->
173+ Status .
174+
175+ -if (? OTP_RELEASE < 27 ).
176+ % % TODO: remove once OTP-25 is the oldest supported OTP version
165177-spec format_status ('normal' | 'terminate' , any ()) -> any ().
166178format_status (_ , [_PDict , State ]) ->
167179 [{data , [{" State" , State # state {credentials = information_redacted }}]}].
180+ -endif .
168181
169182% %====================================================================
170183% % Internal functions
You can’t perform that action at this time.
0 commit comments