summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-31 01:16:20 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-31 01:16:20 -0400
commitd8e4c8a098539a81307900bf188fa6fe628e43b0 (patch)
tree0552f0cac921a80625ad5d2c1fae8efc7b592315
parentce36f822777f2b642fcec7249d8df72ab86c0aa7 (diff)
downloadgetwtxt-d8e4c8a098539a81307900bf188fa6fe628e43b0.tar.gz
added context to 400 errors
-rw-r--r--post.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/post.go b/post.go
index 21b3286..d6da21f 100644
--- a/post.go
+++ b/post.go
@@ -30,7 +30,7 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) {
 
 	out, remoteRegistry, err := registry.GetTwtxt(urls)
 	if err != nil {
-		log400(w, r, err.Error())
+		log400(w, r, "Error Fetching twtxt Data: "+err.Error())
 		return
 	}
 
@@ -40,7 +40,7 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) {
 		remoteRegistries.Mu.Unlock()
 
 		if err := twtxtCache.CrawlRemoteRegistry(urls); err != nil {
-			log400(w, r, err.Error())
+			log400(w, r, "Error Crawling Remote Registry: "+err.Error())
 			return
 		}
 		log200(r)
@@ -49,12 +49,12 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) {
 
 	statuses, err := registry.ParseUserTwtxt(out, nick, urls)
 	if err != nil {
-		log400(w, r, err.Error())
+		log400(w, r, "Error Parsing twtxt Data: "+err.Error())
 		return
 	}
 
 	if err := twtxtCache.AddUser(nick, urls, uip, statuses); err != nil {
-		log400(w, r, err.Error())
+		log400(w, r, "Error Adding User to Cache: "+err.Error())
 		return
 	}
 
69ed1c879866673ce51dfccfb6b78f8055aeb4d'>069ed1c8 ^
62c6d163 ^
292ccba1 ^

069ed1c8 ^
292ccba1 ^







1f56ac64 ^
0cb988d0 ^
3ecd66fb ^
292ccba1 ^
871ea368 ^

292ccba1 ^





069ed1c8 ^
222c31db ^
292ccba1 ^

069ed1c8 ^
292ccba1 ^




ca00f6b9 ^
39c0d1b1 ^
0cb988d0 ^
3ecd66fb ^
292ccba1 ^
ca00f6b9 ^
39c0d1b1 ^
871ea368 ^
b6fdd2e4 ^
292ccba1 ^





0f851e48 ^

aa2e2155 ^
292ccba1 ^
ca00f6b9 ^
39c0d1b1 ^
0cb988d0 ^
292ccba1 ^
ca00f6b9 ^
39c0d1b1 ^
292ccba1 ^





069ed1c8 ^
292ccba1 ^
069ed1c8 ^
292ccba1 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90