Commit Graph

18 Commits

Author SHA1 Message Date
Jack Michaud 5bb9a397b4 feat: add OasstErrorResponse to protocols
Using a shared protocol to serialize the error in the backend
allows clients to use that same protocol to deserialize it.

Changes to this protocol will be caught in tests.
2023-01-02 19:01:29 -05:00
Jack Michaud c7ac01718c refactor: move OasstError into oasst_shared.exceptions (#289)
* refactor: move OasstError into oasst_shared.exceptions

* fix: update OasstError import

* fix: linter errors
2023-01-02 22:03:53 +01:00
kiritowu 2a2968f6d4 Initialise redis connection for Fastapi limiter 2023-01-03 00:28:05 +08:00
Gareth Davidson 7000e10bc0 apply pre-commit rules 2023-01-02 00:01:45 +00:00
Jack Michaud 29b08875d4 refactor: move print_openapi_schema into main 2023-01-01 18:58:01 +01:00
Andreas Köpf ee14554e1b role='user' -> role='prompter' 2022-12-31 00:18:55 +01:00
Andreas Köpf 26ae43e945 additional forgotten renamings 2022-12-31 00:18:55 +01:00
Andreas Köpf 8b225430a4 BREAKING-CHANGES: Renaming several models/database objects + API protocol
person -> user
work_package -> task
post -> message
thread -> message_tree
2022-12-31 00:18:55 +01:00
alexandrelefourner 35e0c32a08 Updating work_package to task 2022-12-31 00:18:55 +01:00
alexandrelefourner 7743459220 Renaming post to message 2022-12-31 00:18:55 +01:00
Andreas Köpf c5053ed6c9 fix typo: uesr->user 2022-12-29 16:13:30 +01:00
Andreas Köpf 833549f212 add two dummy user replies depth>1 2022-12-29 15:58:35 +01:00
Andreas Köpf 30db7254c7 rename flag to DEBUG_USE_SEED_DATA default False, update compose config 2022-12-29 15:58:35 +01:00
Andreas Köpf c2cb2562d5 add db seed-data check on backend startup 2022-12-29 15:58:35 +01:00
Andreas Köpf 0c3103838b add OasstErrorCode IntEnum, use http.HTTPStatus enum 2022-12-28 19:25:39 +01:00
Andreas Köpf 36c74e238c rename handler function to 2022-12-28 14:22:53 +01:00
Andreas Köpf dda668bcd5 Add OasstError exception class and exception filter 2022-12-28 14:10:15 +01:00
Yannic Kilcher b34ef75423 started re-working python code 2022-12-19 18:00:09 +01:00