Skip to content

Commit

Permalink
fix(lib): update Watt-time API's error response message
Browse files Browse the repository at this point in the history
  • Loading branch information
manushak committed Feb 29, 2024
1 parent 334df21 commit 6d46ab0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/watt-time/watt-time-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export const WattTimeAPI = () => {
throw new APIRequestError(
errorBuilder({
message: `Error fetching data from WattTime API. ${JSON.stringify(
error
(error.response &&
error.response.data &&
error.response.data.message) ||
error
)}`,
})
);
Expand Down

0 comments on commit 6d46ab0

Please sign in to comment.