Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-11: Add exceptions to backend (merge with feature/backend) #14

Merged
merged 5 commits into from
Jun 9, 2024

Conversation

ItsNeil17
Copy link
Member

@ItsNeil17 ItsNeil17 commented Jun 9, 2024

  • Added BackendException subclassed from BaseException
  • Added AccessForbidden Backend Exception
  • Added ValidationError Backend Exception

@ItsNeil17 ItsNeil17 self-assigned this Jun 9, 2024
@wos-manager wos-manager bot mentioned this pull request Jun 9, 2024
Copy link

@RoboItsNeil RoboItsNeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wos-manager
Copy link

wos-manager bot commented Jun 9, 2024

There's a new commit after the PR has been approved.

@RoboItsNeil: please review the changes made to this pull request.

@wos-manager wos-manager bot requested a review from RoboItsNeil June 9, 2024 18:14
Copy link

@RoboItsNeil RoboItsNeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: ItsNeil17 <[email protected]>
@wos-manager
Copy link

wos-manager bot commented Jun 9, 2024

There's a new commit after the PR has been approved.

@RoboItsNeil: please review the changes made to this pull request.

@wos-manager wos-manager bot requested a review from RoboItsNeil June 9, 2024 18:16
Copy link

@RoboItsNeil RoboItsNeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ItsNeil17 ItsNeil17 merged commit be073fe into feature/backend Jun 9, 2024
3 checks passed
@ItsNeil17 ItsNeil17 deleted the feat/backend-exceptions branch June 9, 2024 18:16
ItsNeil17 added a commit that referenced this pull request Jun 12, 2024
* Fix: Resolve issues with Player object generation

- Migrate backend to its own directory
- Fix Player generation issues caused by potentially invalid last_npc_win field
- Fix player generation issues caused by unexpected votes field

* Fix: Make api.get_player() return valid Alliance data

* Fix: Contain player alliance data within Alliance object

* Fix: Remove unwanted print statement

* fix linting

* fix linting in models

* add __all__ in backend dir

* add ruff noqa to init files

* GH-11: Add exceptions to backend (merge with feature/backend) (#14)

* implement exceptions

Signed-off-by: ItsNeil17 <[email protected]>

* use implemented exceptions rather than Exception

Signed-off-by: ItsNeil17 <[email protected]>

* fix linting

Signed-off-by: ItsNeil17 <[email protected]>

* fix linting

Signed-off-by: ItsNeil17 <[email protected]>

---------

Signed-off-by: ItsNeil17 <[email protected]>
Signed-off-by: Neil <[email protected]>

* rename variables and static function from_param to get_instance

* feat: Add type hinting to Player.from_data method

* chore: Add recruit_troop method to API class

* feat: Remove unused fields from MarketOrder model

* feat: Add update_alliance_name and update_alliance_user_limit methods to API class

* feat: Add get_market_orders method to API class

* add pyright static type checker to workflow

* remove unnecessary code

* update job name

* refactor: Rename `path` attribute to `url` in Route class

* refactor: Rename `Order` to `MarketOrder` in models/__init__.py

* refactor: Update MarketOrder.from_data method to use dictionary input

* fix backend pyright

* silence gui errors (until they are fixed)

* silence gui errors (until they are fixed)

* Update lint.yml

Signed-off-by: Neil <[email protected]>

---------

Signed-off-by: ItsNeil17 <[email protected]>
Signed-off-by: Neil <[email protected]>
Co-authored-by: None <None>
Co-authored-by: Were_Woof <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants