Skip to content

Commit

Permalink
fix issue with not including error response codes in payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnetordoff committed Jan 17, 2025
1 parent 5551223 commit 75f03ba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ export default class InstitutionalObjectList extends Component<InstitutionalObje
const errorDetail = error?.errors?.[0]?.detail.user || error?.errors?.[0]?.detail || '';
const errorCode = parseInt(error?.errors?.[0]?.status, 10);

if (errorCode === 403 && errorDetail.includes('does not have Access Requests enabled')) {
if (errorDetail.includes('does not have Access Requests enabled')) {
// This error does not include HTTP code in payload, but it returns response header of 403
// Product wanted special handling for this error that involve a second pop-up modal
// Timeout to allow the modal to exit, can't have two OSFDialogs open at same time
setTimeout(() => {
Expand Down

0 comments on commit 75f03ba

Please sign in to comment.