Skip to content

Commit

Permalink
Add null check for object.id in ProfileGetAPI response handling
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldv90 committed Nov 12, 2024
1 parent 3ada262 commit 0da40f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collection-v1/users_api/ProfileGetAPI.bru
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ headers {

script:post-response {
let data = res.getBody();
bru.setEnvVar('id',data.object.id);
if (data.object && data.object.id) {
bru.setEnvVar('id', data.object.id);
}
}

0 comments on commit 0da40f4

Please sign in to comment.