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

Error handling/throwing for non-existant resources #29

Open
Denperidge opened this issue Mar 23, 2023 · 0 comments
Open

Error handling/throwing for non-existant resources #29

Denperidge opened this issue Mar 23, 2023 · 0 comments

Comments

@Denperidge
Copy link

When requesting a resource that doesn't exist, mu-cl-resources seems to return a generic internal server error. It might be useful for a proper error to be returned if possible!

resources_1           | [2023-03-23 15:24:58 [ERROR]] Condition MU-CL-RESOURCES::NO-SUCH-INSTANCE was signalled.
resources_1           | Backtrace for: #<SB-THREAD:THREAD "hunchentoot-worker-192.168.64.8:33245" RUNNING {1006CBF7F3}>
resources_1           | 0: (TRIVIAL-BACKTRACE:PRINT-BACKTRACE-TO-STREAM #<SB-IMPL::STRING-OUTPUT-STREAM {1006D354E3}>)
resources_1           | 1: (HUNCHENTOOT::GET-BACKTRACE)
resources_1           | 2: ((FLET "H0" :IN HUNCHENTOOT:HANDLE-REQUEST) #<MU-CL-RESOURCES::NO-SUCH-INSTANCE {1006D35373}>)
resources_1           | 3: (SB-KERNEL::%SIGNAL #<MU-CL-RESOURCES::NO-SUCH-INSTANCE {1006D35373}>)
resources_1           | 4: (ERROR MU-CL-RESOURCES::NO-SUCH-INSTANCE :RESOURCE #<MU-CL-RESOURCES::RESOURCE {100808CFA3}> :ID "b8380ac-b99e-11ed-bbf2-0242ac1b0003" :TYPE "agenda-items")
resources_1           | 5: (MU-CL-RESOURCES::FIND-RESOURCE-FOR-UUID-THROUGH-SPARQL #<MU-CL-RESOURCES::ITEM-SPEC {1006D1F2E3}>)
resources_1           | 6: (MU-CL-RESOURCES::FIND-RESOURCE-FOR-UUID-THROUGH-CACHE-OR-SPARQL #<MU-CL-RESOURCES::ITEM-SPEC {1006D1F2E3}>)
resources_1           | 7: ((:METHOD MU-CL-RESOURCES::NODE-URL (MU-CL-RESOURCES::ITEM-SPEC)) #<MU-CL-RESOURCES::ITEM-SPEC {1006D1F2E3}>) [fast-method]
resources_1           | 8: (MU-CL-RESOURCES::CACHE-OBJECT #<MU-CL-RESOURCES::ITEM-SPEC {1006D1F2E3}>)
resources_1           | 9: (MU-CL-RESOURCES::CACHE-LIST-CALL #<MU-CL-RESOURCES::RESOURCE {100808CFA3}>)
resources_1           | 10: ((:METHOD MU-CL-RESOURCES::LIST-CALL (MU-CL-RESOURCES::RESOURCE)) #<MU-CL-RESOURCES::RESOURCE {100808CFA3}>) [fast-method]
resources_1           | 11: ((LAMBDA (MU-CL-RESOURCES::BASE-PATH) :IN "/app/framework/call-specification.lisp") "agenda-items")
resources_1           | 12: ((LAMBDA NIL :IN MU-SUPPORT::MK-RESPONSE-METHOD))
resources_1           | 13: ((:METHOD HUNCHENTOOT:HANDLE-REQUEST (HUNCHENTOOT:ACCEPTOR HUNCHENTOOT:REQUEST)) #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 80)> #<HUNCHENTOOT:REQUEST {1006D1BF53}>) [fast-method]
resources_1           | 14: ((:METHOD HUNCHENTOOT:PROCESS-REQUEST (T)) #<HUNCHENTOOT:REQUEST {1006D1BF53}>) [fast-method]
resources_1           | 15: (HUNCHENTOOT::DO-WITH-ACCEPTOR-REQUEST-COUNT-INCREMENTED #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 80)> #<CLOSURE (LAMBDA NIL :IN HUNCHENTOOT:PROCESS-CONNECTION) {1006D1B30B}>)
resources_1           | 16: ((:METHOD HUNCHENTOOT:PROCESS-CONNECTION (HUNCHENTOOT:ACCEPTOR T)) #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 80)> #<USOCKET:STREAM-USOCKET {1006CBE943}>) [fast-method]
resources_1           | 17: ((:METHOD HUNCHENTOOT:PROCESS-CONNECTION :AROUND (HUNCHENTOOT:ACCEPTOR T)) #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 80)> #<USOCKET:STREAM-USOCKET {1006CBE943}>) [fast-method]
resources_1           | 18: ((FLET HUNCHENTOOT::PROCESS-CONNECTION% :IN HUNCHENTOOT::HANDLE-INCOMING-CONNECTION%) #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 80)> #<USOCKET:STREAM-USOCKET {1006CBE943}>)
resources_1           | 19: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
resources_1           | 20: ((FLET SB-UNIX::BODY :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
resources_1           | 21: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
resources_1           | 22: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
resources_1           | 23: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX))
resources_1           | 24: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FEBA39D6CDB}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "hunchentoot-worker-192.168.64.8:33245" RUNNING {1006CBF7F3}>> NIL T NIL)
resources_1           | 25: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "hunchentoot-worker-192.168.64.8:33245" RUNNING {1006CBF7F3}> NIL #<CLOSURE (LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS) {1006CBF79B}> NIL)
resources_1           | 26: ("foreign function: call_into_lisp")
resources_1           | 27: ("foreign function: new_thread_trampoline")
@Denperidge Denperidge changed the title Error handling/throwing for an non-existant resource Error handling/throwing for non-existant resources Mar 23, 2023
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

No branches or pull requests

1 participant