Skip to content

Commit

Permalink
Merge pull request #252 from tharropoulos/error-code
Browse files Browse the repository at this point in the history
fix: handle undefined error codes in logger warnings
  • Loading branch information
jasonbosco authored Dec 12, 2024
2 parents b183c36 + 15e0134 commit 67d4b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Typesense/ApiCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default class ApiCall {
this.logger.warn(
`Request #${requestNumber}: Request to Node ${
node.index
} failed due to "${error.code} ${error.message}${
} failed due to "${error?.code ?? ""} ${error.message}${
error.response == null
? ""
: " - " + JSON.stringify(error.response?.data)
Expand Down

0 comments on commit 67d4b06

Please sign in to comment.