You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -117,16 +118,18 @@ const body = await res.text();
117
118
letparsedBody;
118
119
try{
119
120
parsedBody=JSON.parse(body);
120
-
}catch(err){
121
+
}
122
+
catch(err){
121
123
parsedBody=body;
122
124
}
123
125
124
126
if(!res.ok){
125
-
core.setFailed(newError(`Modrinth API returned error status ${res.status}: ${typeofparsedBody==="string" ? parsedBody : JSON.stringify(parsedBody,null,2)}`));
127
+
core.setFailed(`Modrinth API returned error status ${res.status} (${http.STATUS_CODES[res.status]??"unknown"}): ${typeofparsedBody==="string" ? parsedBody : JSON.stringify(parsedBody,null,2)}`);
126
128
process.exit(1);
127
129
}
128
130
129
131
else{
130
132
core.setOutput("version-id",parsedBody.id);
133
+
core.info(`\x1b[32m✔\x1b[0m Successfully uploaded version on Modrinth.\n\tID: ${parsedBody.id}`);
0 commit comments