Skip to content

Commit

Permalink
Update error handling in CitableRepositoryPage.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Aug 12, 2024
1 parent 37dcdf4 commit 094e28c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ const error = ref<string | null>(null)
async function update() {
error.value = null
const { data } = await client.GET("/api/repositories", {
const { data, error: requestError } = await client.GET("/api/repositories", {
params: {
query: {
owner: props.username,
name: props.repositoryName,
},
},
})
if (data instanceof Array) {
if (requestError) {
error.value = requestError.err_msg
} else if (data instanceof Array) {
if (data.length == 0) {
error.value = `Repository ${props.username}/${props.repositoryName} is not found`
} else {
Expand Down

0 comments on commit 094e28c

Please sign in to comment.