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

fix: Return 400 instead of 500 in /admin/lists endpoint (DEV-3556) #3229

Merged

Conversation

seakayone
Copy link
Contributor

@seakayone seakayone commented May 2, 2024

  • Replace throw BadRequest/DuplicateValue exceptions which lead to a ZIO.die with ZIO.fail which will be mapped to the correct response http status code

Pull Request Checklist

Task Description/Number

Issue Number: DEV-

PR Type

  • build/chore: maintenance tasks (no production code change)
  • docs: documentation changes (no production code change)
  • feat: represents new features
  • fix: represents bug fixes
  • perf: performance improvements
  • refactor: represents production code refactoring
  • test: adding or refactoring tests (no production code change)
  • deprecated: Deprecation warning (ideally referencing a migration guide)

Basic requirements for bug fixes and features

  • Tests for the changes have been added
  • Docs have been added / updated

Does this PR introduce a breaking change?

  • Yes

Does this PR change client-test-data?

  • Yes

@seakayone seakayone changed the title fis: Return 400 instead of 500 in ListResponder (DEV-3556) fix: Return 400 instead of 500 in ListResponder (DEV-3556) May 2, 2024
@seakayone seakayone force-pushed the fix/return-400-instead-of-500-for-list-node-creation branch from a1e129d to fcb1d63 Compare May 2, 2024 09:50
@seakayone seakayone marked this pull request as ready for review May 2, 2024 10:20
@seakayone seakayone changed the title fix: Return 400 instead of 500 in ListResponder (DEV-3556) fix: Return 400 instead of 500 in /admin/lists endpoint (DEV-3556) May 2, 2024
…esponder.scala

Co-authored-by: Marcin Procyk <marcin.procyk@dasch.swiss>
@seakayone seakayone enabled auto-merge (squash) May 2, 2024 13:36
@seakayone seakayone merged commit 60029b7 into main May 2, 2024
10 checks passed
@seakayone seakayone deleted the fix/return-400-instead-of-500-for-list-node-creation branch May 2, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants