Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from JupiterOne/INT-11232-v2
Browse files Browse the repository at this point in the history
Fix error handling
  • Loading branch information
VDubber authored Jul 2, 2024
2 parents 2678b3e + 09840a6 commit eb77057
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ and this project adheres to

## [Unreleased]

## 1.1.1 - 2024-07-02
## 1.1.2 & 1.1.3 - 2024-07-02

### Fixed

- Pagination was incorrectly adding serach params to the URL. Fixed.
- Pagination was incorrectly adding search params to the URL. Fixed.
- Handle 422s for devices that are not running MacOS and therefore don't support
fetching of users.

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": "@jupiterone/graph-simplemdm",
"version": "1.1.2",
"version": "1.1.3",
"description": "A JupiterOne Integration for ingesting data of the SimpleMDM API",
"repository": {
"type": "git",
Expand Down
7 changes: 4 additions & 3 deletions src/steps/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ export async function fetchUsers({
})
.catch((error) => {
if (error.status === 422) {
// Based on a hunch, this device is not running macOS and therefore does not support this operation.
// Docs: https://api.simplemdm.com/#delete-user
logger.info(
{ deviceId: device.id },
'Received status 422 for this device, does not support user iteration.',
);
// Based on a hunch, this device is not running macOS and therefore does not support this operation.
// Docs: https://api.simplemdm.com/#delete-user
} else {
throw error;
}
throw error;
});
},
);
Expand Down

0 comments on commit eb77057

Please sign in to comment.