Skip to content

Commit

Permalink
Throw error instead of just printing. (#291)
Browse files Browse the repository at this point in the history
This will be caught at a higher level which prevents users from seeing success message on failure.
  • Loading branch information
ankur2136 authored Aug 15, 2024
1 parent d62c0bf commit c06aa92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/publish/dapp_publisher_portal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ export const submitRequestToSolanaDappPublisherPortal = async (
})
.catch((error) => {
if (error.response) {
console.error(`ERROR: failed to submit request to dApp publisher portal: ${error.response.status} /`, error.response.data);
throw new Error(`Failed to submit request\nError status code: ${error.response.status}\nError message: ${error.response.data}`);
} else if (error.request) {
console.error(`ERROR: failed sending request to dApp publisher portal:`, error.request);
throw new Error(`Failed to submit request: ${error.request}`);
} else {
console.error(`ERROR: failed sending request:`, error);
throw new Error(`Failed to submit request: ${error}`);
}
});
} else {
Expand Down

0 comments on commit c06aa92

Please sign in to comment.