An open API service indexing awesome lists of open source software.

https://github.com/mmontone/hunchentoot-errors

Augments Hunchentoot error pages and logs with request and session information.
https://github.com/mmontone/hunchentoot-errors

common-lisp hunchentoot lisp web

Last synced: about 2 months ago
JSON representation

Augments Hunchentoot error pages and logs with request and session information.

Awesome Lists containing this project

README

        

# hunchentoot-errors

Augments Hunchentoot error pages and logs with request and session information

## Usage

Subclass your acceptor from `HUNCHENTOOT-ERRORS:ERRORS-ACCEPTOR`.

When `hunchentoot:*show-lisp-errors-p*` is on, you get HTTP request and session information printed in errors pages and logs, like:

```
Backtrace for: #
0: (TRIVIAL-BACKTRACE:PRINT-BACKTRACE-TO-STREAM #)
1: ((FLET "FORM-FUN-4" :IN HUNCHENTOOT::GET-BACKTRACE))
2: (HUNCHENTOOT::GET-BACKTRACE)
3: ((FLET "H0" :IN HUNCHENTOOT:HANDLE-REQUEST) #)
4: (SB-KERNEL::%SIGNAL #)
5: (ERROR "sdf")
6: (INVOICE-ENGINE::ADMIN/USERS/CREATE)
7: ((LAMBDA NIL :IN EASY-ROUTES::PROCESS-ROUTE))
8: (EASY-ROUTES::CALL-WITH-DECORATORS NIL #)
9: ((LAMBDA NIL :IN EASY-ROUTES::CALL-WITH-DECORATORS))
10: (INVOICE-ENGINE::@SUPERADMIN #)
11: (EASY-ROUTES::CALL-DECORATOR INVOICE-ENGINE::@SUPERADMIN #)
12: (EASY-ROUTES::CALL-WITH-DECORATORS (INVOICE-ENGINE::@SUPERADMIN) #)
13: ((:METHOD EASY-ROUTES::PROCESS-ROUTE (EASY-ROUTES:ROUTE T)) # NIL) [fast-method]
14: ((:METHOD HUNCHENTOOT:ACCEPTOR-DISPATCH-REQUEST (EASY-ROUTES:EASY-ROUTES-ACCEPTOR T)) # #) [fast-method]
15: ((:METHOD HUNCHENTOOT:HANDLE-REQUEST (HUNCHENTOOT:ACCEPTOR HUNCHENTOOT:REQUEST)) # #) [fast-method]
16: ((:METHOD HUNCHENTOOT:PROCESS-REQUEST (T)) #) [fast-method]
17: ((SB-PCL::DEFAULT-ONLY HUNCHENTOOT:PROCESS-REQUEST) #)
18: ((LAMBDA NIL :IN HUNCHENTOOT:PROCESS-CONNECTION))
19: (HUNCHENTOOT::DO-WITH-ACCEPTOR-REQUEST-COUNT-INCREMENTED # #)
20: ((:METHOD HUNCHENTOOT:PROCESS-CONNECTION (HUNCHENTOOT:ACCEPTOR T)) # #) [fast-method]
21: ((FLET CALL-NEXT-METHOD :IN "/mnt/e6b00b8f-9dad-4bf4-bd40-34b1e6d31f0a/home/marian/quicklisp/dists/quicklisp/software/hunchentoot-v1.2.38/acceptor.lisp"))
22: ((:METHOD HUNCHENTOOT:PROCESS-CONNECTION :AROUND (HUNCHENTOOT:ACCEPTOR T)) # #) [fast-method]
23: ((FLET HUNCHENTOOT::PROCESS-CONNECTION% :IN HUNCHENTOOT::HANDLE-INCOMING-CONNECTION%) # #)
24: ((:METHOD HUNCHENTOOT::HANDLE-INCOMING-CONNECTION% (HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER T)) # #) [fast-method]
25: ((LAMBDA NIL :IN HUNCHENTOOT:CREATE-REQUEST-HANDLER-THREAD))
26: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
27: ((FLET SB-UNIX::BODY :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
28: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
29: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
30: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX))
31: (SB-THREAD::CALL-WITH-MUTEX # #> NIL T NIL)
32: (SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE # NIL # NIL)
33: ("foreign function: call_into_lisp")
34: ("foreign function: new_thread_trampoline")

HTTP REQUEST:
uri: /admin/users/new
method: POST
post parameters:
name: asdf
username: asdf
email: [email protected]
password: asdfasdf

SESSION:
FLASH-MESSAGES: NIL
ROLE: "superadmin"
USER: 3
FORWARD-URL: "/"
```

## License

MIT