File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -148,12 +148,8 @@ IEnumerator coroutine()
148
148
response . text = webRequest . downloadHandler . text ;
149
149
150
150
LootLockerErrorData errorData = LootLockerJson . DeserializeObject < LootLockerErrorData > ( webRequest . downloadHandler . text ) ;
151
- // Check if the error uses the "new" error style (https://docs.lootlocker.com/reference/error-codes)
152
- if ( errorData != null && ! string . IsNullOrEmpty ( errorData . code ) )
153
- {
154
- response . errorData = errorData ;
155
- }
156
- else
151
+ // Check if the error uses the "old" error style, not the "new" (https://docs.lootlocker.com/reference/error-codes)
152
+ if ( errorData == null || string . IsNullOrEmpty ( errorData . code ) )
157
153
{
158
154
errorData = new LootLockerErrorData ( ) ;
159
155
switch ( webRequest . responseCode )
@@ -208,7 +204,8 @@ IEnumerator coroutine()
208
204
}
209
205
errorData . message += " " + ObfuscateJsonStringForLogging ( webRequest . downloadHandler . text ) ;
210
206
}
211
- LootLockerLogger . GetForLogLevel ( LootLockerLogger . LogLevel . Error ) ( errorData . message + ( ! string . IsNullOrEmpty ( errorData . doc_url ) ? " -- " + errorData . doc_url : "" ) ) ;
207
+ response . errorData = errorData ;
208
+ LootLockerLogger . GetForLogLevel ( LootLockerLogger . LogLevel . Error ) ( response . errorData . message + ( ! string . IsNullOrEmpty ( response . errorData . doc_url ) ? " -- " + response . errorData . doc_url : "" ) ) ;
212
209
OnServerResponse ? . Invoke ( response ) ;
213
210
}
214
211
}
You can’t perform that action at this time.
0 commit comments