mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
Forward errors from GQL to the UI
This commit is contained in:
parent
eb326ae6fb
commit
89738ae198
|
@ -205,7 +205,9 @@ class GitService(SrhtService):
|
|||
}
|
||||
})
|
||||
if not r["data"]:
|
||||
raise Exception(f"Invalid response from git.sr.ht: {r}")
|
||||
for error in r["errors"]:
|
||||
valid.error(error["message"])
|
||||
return None
|
||||
repo = r["data"]["createRepository"]
|
||||
repo["visibility"] = repo["visibility"].lower()
|
||||
return r["data"]["createRepository"]
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
value="{{ description or project.description }}" />
|
||||
{{valid.summary("description")}}
|
||||
</div>
|
||||
{{valid.summary()}}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="create">
|
||||
Create new {{vcs}} repository {{ icon("caret-right") }}
|
||||
|
|
Loading…
Reference in New Issue