Skip to content

Commit

Permalink
chore: added the api error type
Browse files Browse the repository at this point in the history
  • Loading branch information
jvandenaardweg committed Dec 5, 2022
1 parent 91f4a87 commit 371d429
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ export interface HomeWizardEnergyPlatformAccessoryContext {
energySocket: EnergySocketAccessoryProperties;
}

export interface HomeWizardApiErrorResponse {
error: {
id: ErrorCodes;
description: string;
};
}

/**
* When you perform an invalid request or something went wrong, the API will respond with an error message.
* You have to check if the HTTP status code returns 200 OK before parsing the result.
Expand Down

0 comments on commit 371d429

Please sign in to comment.