#507 Fix infined load on Issues/Pulls if they dont exist

Merged
6543 merged 2 commits from fix-404-errors into master 1 week ago
mmarif commented 1 week ago

If issues/pr are disabled, catch the correct response call and show proper layout.

close #53

If issues/pr are disabled, catch the correct response call and show proper layout. close #53
mmarif added this to the 3.0.0 milestone 1 week ago
mmarif added the
Improvement
label 1 week ago
mmarif self-assigned this 1 week ago
mmarif added 2 commits 1 week ago
6543 commented 1 week ago

can we use switch case for httpStatus checks in gennerel?

I’ll pusch a commit

can we use switch case for httpStatus checks in gennerel? I'll pusch a commit
6543 added 33 commits 1 week ago
6543 added 3 commits 1 week ago
6543 commented 1 week ago

@mmarif I would say the first batch got in ...

@mmarif I would say the first batch got in ...
6543 commented 1 week ago

@mmarif @opyale I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks

https://try.gitea.io/api/swagger#/repository/repoGetAllCommits
-> expected returns are 200, 404 and 409 for example

@mmarif @opyale I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks https://try.gitea.io/api/swagger#/repository/repoGetAllCommits -> expected returns are 200, 404 and 409 for example
6543 changed title from Improve 404 calls to Fix infined load on Issues/Pulls if they dont exist & Refactor 1 week ago
6543 added the
Bug
label 1 week ago
6543 added the
LGTM-need
label 1 week ago
6543 removed the
Improvement
label 1 week ago
mmarif commented 1 week ago

I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks

I am fine with it. Just curious, what are the advantages of switch over if?

> I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks I am fine with it. Just curious, what are the advantages of switch over if?
mmarif commented 1 week ago

@6543 This PR with the your commits became very huge and unreadable.

Can we focus on the issue and pr calls in this PR which will fix the inifinite loop issue?

Reformat code: new PR

Change to switch cases: new PR

What you think?

@6543 This PR with the your commits became very huge and unreadable. Can we focus on the issue and pr calls in this PR which will fix the inifinite loop issue? Reformat code: new PR Change to switch cases: new PR What you think?
6543 changed title from Fix infined load on Issues/Pulls if they dont exist & Refactor to Fix infined load on Issues/Pulls if they dont exist 1 week ago
6543 force-pushed the fix-404-errors branch from c0eccbacd4 to 67e9a694e9. 1 week ago
6543 commented 1 week ago

@mmarif removed

@mmarif removed
6543 added the
LGTM-done
label 1 week ago
6543 removed the
LGTM-need
label 1 week ago
6543 approved these changes 1 week ago
6543 left a comment

fix itself works excelent

6543 merged commit 34f8f82b63 into master 1 week ago
6543 deleted branch fix-404-errors 1 week ago
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.