Skip to content

Commit

Permalink
Merge pull request #79 from apptreesoftware/updatingAuthErrorCheck
Browse files Browse the repository at this point in the history
updated auth check to also see if there's a message to catch error th…
  • Loading branch information
alexisandreason authored Oct 5, 2023
2 parents 1a7386b + 054dc42 commit 9f41489
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ export class ApiError extends Error {
}

toString() {
if (this.isAuthorizationError) {
const message = this.message;
if (this.isAuthorizationError && !message) {
return 'Authorization Failed';
}
let str = this.message;
let str = message;
if (this.resp.request) {
str = `${str}
str = `${message}
METHOD: ${this.resp.request.method}
HOST: ${this.resp.config.baseURL}
URL: ${this.resp.request.path}
Expand Down
3 changes: 3 additions & 0 deletions model/famis_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,15 @@ export interface State {
export interface Inspection {
Id: number;
InspectionClassId?: number;
InspectionClass?: InspectionClass;
InspectionTypeId?: number;
InspectionType?: InspectionType;
PropertyId?: number;
SpaceId?: number;
SubspaceId?: number;
FloorId?: number;
InspectorId?: number;
Inspector?: FamisUser;
InspectionDate?: Date;
InspectionTime?: string;
Occupant?: string;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "facility360",
"version": "1.0.14",
"version": "1.0.15",
"description": "A Node based 360Facility client SDK",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 9f41489

Please sign in to comment.