Skip to content

Commit

Permalink
fix(SPV-1136): move error message variable inside if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
dorzepowski committed Oct 28, 2024
1 parent bf0d5e9 commit c4d20c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ interface ApiErrorInfo {
}

const extractApiError = (error: ErrorResponse | Error): ApiErrorInfo | null => {
let errorMessage = '';
if (error instanceof ErrorResponse) {
let errorMessage = '';
try {
errorMessage = JSON.parse(error.content).message;
} catch (error) {
Expand Down

0 comments on commit c4d20c6

Please sign in to comment.