Skip to content

Commit

Permalink
Handle failed resolution of version sha
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Nov 12, 2024
1 parent f1c64f4 commit f8dba45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
requests
getShaOfVersion: aString
^ (WebClient httpGet: (self githubApiUrlForVersion: aString)) content parseAsJson at: 'sha'
| response json |
response := WebClient httpGet: (self githubApiUrlForVersion: aString).
json := response content parseAsJson.
response code = 200 ifFalse: [
^ self error: ('Error while trying to resolve git-s version {1}: {2}'
format: {aString printString. json at: 'message'})].
^ json at: 'sha'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
"branchName" : "mad 10/9/2024 16:34",
"fullRepositoryName" : "mad 10/9/2024 16:33",
"getShaOfVersion:" : "mad 10/9/2024 18:39",
"getShaOfVersion:" : "mad 10/24/2024 15:07",
"githubApiUrlForVersion:" : "mad 10/9/2024 18:38",
"installScriptForInstalledVersion" : "mad 10/9/2024 16:51",
"installScriptForVersion:" : "mad 10/9/2024 16:50",
Expand Down

0 comments on commit f8dba45

Please sign in to comment.