Commit e50e9f3
committed
💩 🔊 Add additional logging to the request handling
We have been a mysterious 403 error during `/usercache/put` from some users
only. However, we don't see the `usercache/put` in the application logs.
This adds additional logging to the incoming call path on the webapp, allowing
us to intercept messages earlier and figure out where the error is thrown from.
This helps with
e-mission/e-mission-docs#1127
We log the messages using `logging` instead of `print` so that they show up in
the correct order with the rest of the log messages. We also log the raw token
in the input hook so we can see what we receive before trying to map it to a
local UUID.
We also cannot get the length of an error so we need to check the output type first
```
Traceback (most recent call last):
File "/usr/src/devapp/emission/net/api/bottle.py", line 1022, in _handle
if len(out) > 40:
TypeError: object of type 'HTTPError' has no len()
```
We also have to handle a `None` output1 parent a6e4a8f commit e50e9f3
3 files changed
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
470 | 471 | | |
471 | 472 | | |
472 | 473 | | |
| 474 | + | |
473 | 475 | | |
474 | 476 | | |
475 | 477 | | |
| |||
977 | 979 | | |
978 | 980 | | |
979 | 981 | | |
| 982 | + | |
980 | 983 | | |
981 | 984 | | |
982 | 985 | | |
| |||
985 | 988 | | |
986 | 989 | | |
987 | 990 | | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
988 | 996 | | |
989 | 997 | | |
990 | 998 | | |
991 | 999 | | |
| 1000 | + | |
992 | 1001 | | |
993 | 1002 | | |
994 | 1003 | | |
995 | 1004 | | |
996 | 1005 | | |
| 1006 | + | |
997 | 1007 | | |
998 | 1008 | | |
999 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
1000 | 1012 | | |
1001 | 1013 | | |
1002 | 1014 | | |
| |||
1006 | 1018 | | |
1007 | 1019 | | |
1008 | 1020 | | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1009 | 1025 | | |
1010 | 1026 | | |
1011 | 1027 | | |
1012 | 1028 | | |
1013 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
1014 | 1032 | | |
1015 | 1033 | | |
1016 | 1034 | | |
| 1035 | + | |
1017 | 1036 | | |
1018 | 1037 | | |
| 1038 | + | |
1019 | 1039 | | |
1020 | 1040 | | |
1021 | 1041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
| 436 | + | |
436 | 437 | | |
437 | 438 | | |
438 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
| 593 | + | |
593 | 594 | | |
594 | 595 | | |
595 | 596 | | |
| |||
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
| 604 | + | |
603 | 605 | | |
604 | 606 | | |
605 | 607 | | |
| |||
614 | 616 | | |
615 | 617 | | |
616 | 618 | | |
| 619 | + | |
617 | 620 | | |
618 | 621 | | |
619 | 622 | | |
| |||
625 | 628 | | |
626 | 629 | | |
627 | 630 | | |
| 631 | + | |
628 | 632 | | |
629 | 633 | | |
630 | 634 | | |
| |||
716 | 720 | | |
717 | 721 | | |
718 | 722 | | |
| 723 | + | |
719 | 724 | | |
720 | 725 | | |
721 | 726 | | |
| |||
809 | 814 | | |
810 | 815 | | |
811 | 816 | | |
| 817 | + | |
812 | 818 | | |
813 | 819 | | |
814 | 820 | | |
| |||
1921 | 1927 | | |
1922 | 1928 | | |
1923 | 1929 | | |
| 1930 | + | |
1924 | 1931 | | |
1925 | 1932 | | |
1926 | 1933 | | |
| |||
1977 | 1984 | | |
1978 | 1985 | | |
1979 | 1986 | | |
| 1987 | + | |
1980 | 1988 | | |
1981 | 1989 | | |
1982 | 1990 | | |
| |||
0 commit comments