Skip to content

Commit

Permalink
Merge pull request #957 from jetstreamapp/bug/954
Browse files Browse the repository at this point in the history
Allow deploying object in production orgs
  • Loading branch information
paustint authored Jul 1, 2024
2 parents 9e9c497 + f61a400 commit 8150a57
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { logger } from '@jetstream/shared/client-logger';
import { useRollbar } from '@jetstream/shared/ui-utils';
import { getErrorMessageAndStackObj } from '@jetstream/shared/utils';
import { Maybe, SalesforceOrgUi } from '@jetstream/types';
import { useDeployMetadataPackage } from '@jetstream/ui-core';
import { useCallback, useState } from 'react';
Expand Down Expand Up @@ -68,7 +69,7 @@ export default function useCreateObject({ apiVersion, serverUrl, selectedOrg }:

try {
const results = await doDeployMetadata(selectedOrg, file, {
rollbackOnError: false,
rollbackOnError: true,
singlePackage: true,
allowMissingFiles: false,
});
Expand All @@ -94,14 +95,14 @@ export default function useCreateObject({ apiVersion, serverUrl, selectedOrg }:
}
setStatus('SUCCESS');
} catch (ex) {
rollbar.error('Deploy object permission records Fatal Error', { message: ex.message, stack: ex.stack });
rollbar.error('Deploy object permission records Fatal Error', getErrorMessageAndStackObj(ex));
setStatus('FAILED');
} finally {
setLoading(false);
setDeployed(true);
}
} catch (ex) {
rollbar.error('Deploy object Fatal Error', { message: ex.message, stack: ex.stack });
rollbar.error('Deploy object Fatal Error', getErrorMessageAndStackObj(ex));
setStatus('FAILED');
}
},
Expand Down

0 comments on commit 8150a57

Please sign in to comment.