mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Fix printAPIErrorsAsConsoleTable function
This commit is contained in:
parent
3d1b041694
commit
e3852a2b20
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ export const clearUserId = () => {
|
|||
};
|
||||
|
||||
const printAPIErrorsAsConsoleTable = apiErrors => {
|
||||
if (typeof console.table === 'function') {
|
||||
if (apiErrors != null && apiErrors.length > 0 && typeof console.table === 'function') {
|
||||
console.log('Errors returned by Marketplace API call:');
|
||||
console.table(apiErrors.map(err => ({ status: err.status, code: err.code, ...err.meta })));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue