File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-update-cli" ,
3- "version" : " 1.30.2 " ,
3+ "version" : " 1.30.3 " ,
44 "description" : " Command tools for javaScript updater with `pushy` service for react native apps." ,
55 "main" : " index.js" ,
66 "bin" : {
Original file line number Diff line number Diff line change @@ -66,7 +66,11 @@ async function query(url, options) {
6666 try {
6767 json = JSON . parse ( text ) ;
6868 } catch ( e ) {
69- throw new Error ( `Server error: ${ text } ` ) ;
69+ if ( resp . statusText . includes ( 'Unauthorized' ) ) {
70+ throw new Error ( '登录信息已过期,请使用 pushy login 命令重新登录' ) ;
71+ } else {
72+ throw new Error ( `Server error: ${ resp . statusText } ` ) ;
73+ }
7074 }
7175
7276 if ( resp . status !== 200 ) {
@@ -166,7 +170,7 @@ export async function uploadFile(fn, key) {
166170 }
167171 if ( resp . statusCode > 299 ) {
168172 return reject (
169- Object . assign ( new Error ( JSON . stringify ( body ) ) , {
173+ Object . assign ( new Error ( body ) , {
170174 status : resp . statusCode ,
171175 } ) ,
172176 ) ;
You can’t perform that action at this time.
0 commit comments