Skip to content

Commit 489aab8

Browse files
committed
rm registry message
Signed-off-by: zxypro1 <1018995004@qq.com>
1 parent c324cfd commit 489aab8

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

packages/registry/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@serverless-devs/registry",
3-
"version": "0.0.12-beta.3",
3+
"version": "0.0.12-beta.4",
44
"description": "request for serverless-devs",
55
"main": "lib/index.js",
66
"scripts": {

packages/registry/src/actions/package.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,13 @@ async function getUploadUrl(codeUri: string): Promise<string> {
121121
readme_en: readmeEn,
122122
readme,
123123
};
124-
125-
try {
126-
const { body, request_id } = await request.new_request_post(PUBLISH_URL, requestBodyIRequest);
127-
logger.debug(`Publish responseId: ${request_id}`);
128-
if (typeof body === 'string') {
129-
throw new Error(body);
130-
}
131-
logger.debug(`Publish res body: ${JSON.stringify(body)}`);
132-
return body.url;
133-
} catch (error) {
134-
logger.debug(`Publish error: ${error}`);
135-
throw new Error('Publish request error, please check your internet connection or registry setting.');
124+
const { body, request_id } = await request.new_request_post(PUBLISH_URL, requestBodyIRequest);
125+
logger.debug(`Publish responseId: ${request_id}`);
126+
if (typeof body === 'string') {
127+
throw new Error(body);
136128
}
129+
logger.debug(`Publish res body: ${JSON.stringify(body)}`);
130+
return body.url;
137131
}
138132

139133
function getNameAndVersion(codeUri: string): string {

0 commit comments

Comments
 (0)