Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #157 from GaloyMoney/chore--no-longer-treat-dealer…
Browse files Browse the repository at this point in the history
…-error-as-critical-as-it's-now-been-deprecated

chore: no longer treat dealer error as critical as it's now been deprecated
  • Loading branch information
nicolasburtey authored Feb 5, 2023
2 parents 12cf21d + 3aa8855 commit 5138c7f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dealer/src/DealerRemoteWalletV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class DealerRemoteWalletV2 implements GaloyWallet {
},
}
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
logger.error(
{ query: BALANCE_QUERY, error },
"{query} to galoy graphql api failed with {error}",
Expand Down Expand Up @@ -336,7 +336,7 @@ export class DealerRemoteWalletV2 implements GaloyWallet {

return { ok: true, value: undefined }
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
logger.error(
{ mutation: MUTATIONS.onChainAddressCurrent, error },
"{mutation} to galoy graphql api failed with {error}",
Expand Down
10 changes: 5 additions & 5 deletions dealer/src/ExchangeBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export abstract class ExchangeBase {
value: result,
}
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
return { ok: false, error: error }
}
},
Expand Down Expand Up @@ -303,7 +303,7 @@ export abstract class ExchangeBase {
},
}
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
return { ok: false, error: error }
}
},
Expand Down Expand Up @@ -448,7 +448,7 @@ export abstract class ExchangeBase {
},
}
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
return { ok: false, error: error }
}
},
Expand Down Expand Up @@ -493,7 +493,7 @@ export abstract class ExchangeBase {
},
}
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
return { ok: false, error: error }
}
},
Expand Down Expand Up @@ -566,7 +566,7 @@ export abstract class ExchangeBase {
value: result,
}
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
return { ok: false, error: error }
}
},
Expand Down
2 changes: 1 addition & 1 deletion dealer/src/OkexExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export class OkexExchange extends ExchangeBase {
value: true,
}
} catch (error) {
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Critical })
recordExceptionInCurrentSpan({ error, level: ErrorLevel.Info })
return { ok: true, value: true }
}
},
Expand Down
8 changes: 4 additions & 4 deletions dealer/src/services/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const syncRunInSpan = <F extends () => ReturnType<F>>(
span.end()
return ret
} catch (error) {
recordException(span, error, ErrorLevel.Critical)
recordException(span, error, ErrorLevel.Info)
span.end()
throw error
}
Expand All @@ -175,7 +175,7 @@ export const asyncRunInSpan = <F extends () => ReturnType<F>>(
span.end()
return ret
} catch (error) {
recordException(span, error, ErrorLevel.Critical)
recordException(span, error, ErrorLevel.Info)
span.end()
throw error
}
Expand Down Expand Up @@ -252,7 +252,7 @@ export const wrapToRunInSpan = <
span.end()
return ret
} catch (error) {
recordException(span, error, ErrorLevel.Critical)
recordException(span, error, ErrorLevel.Info)
span.end()
throw error
}
Expand Down Expand Up @@ -299,7 +299,7 @@ export const wrapAsyncToRunInSpan = <
span.end()
return ret
} catch (error) {
recordException(span, error, ErrorLevel.Critical)
recordException(span, error, ErrorLevel.Info)
span.end()
throw error
}
Expand Down

0 comments on commit 5138c7f

Please sign in to comment.