{"id":5154,"date":"2011-06-09T11:04:47","date_gmt":"2011-06-09T16:04:47","guid":{"rendered":"http:\/\/bobbeaty.com\/wp\/?p=5154"},"modified":"2011-06-10T10:29:46","modified_gmt":"2011-06-10T15:29:46","slug":"better-handling-of-misbehaving-clients","status":"publish","type":"post","link":"https:\/\/bobbeaty.com\/wp\/archives\/5154","title":{"rendered":"Better Handling of Misbehaving Clients"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/bobbeaty.com\/wp\/wp-content\/uploads\/2011\/06\/GreekEngine.jpg\" alt=\"High-Tech Greek Engine\" title=\"GreekEngine.jpg\" border=\"0\" width=\"125\" height=\"125\" style=\"float:right;\" \/><\/p>\n<p>Today I did a lot more interaction with the UI developer that's putting a <em>beautiful<\/em> web interface on my Greek Engine. Really, he's using the Greek Engine as a support service to a project that the business is really hot to get into production. It's nice, and pulling from a lot of services registered in The Broker. It's just that he was starting to try and hit my service for data, and not getting anything, and I was not really logging what was happening.<\/p>\n<p>What <strong>was<\/strong> happening was he was misspelling the command component, and I was doing <em>exactly<\/em> what I'd told the system to do - which is nothing, and then return nothing. Clearly, I needed to handle mis-behaving clients a <strong>lot<\/strong> better.<\/p>\n<p>What I did was to simply add in a check to see if the client's request was going to cause me to do <em>anything<\/em>. If not, then I logged it, and sent him back an error. That should make it a lot clearer what is going on for malformed requests. With the logging, this allows me to know what's up with the clients as well. Much better.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I did a lot more interaction with the UI developer that&#8217;s putting a beautiful web interface on my Greek Engine. Really, he&#8217;s using the Greek Engine as a support service to a project that the business is really hot to get into production. It&#8217;s nice, and pulling from a lot of services registered in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-5154","post","type-post","status-publish","format-standard","hentry","category-coding","category-cube-life"],"_links":{"self":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts\/5154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/comments?post=5154"}],"version-history":[{"count":3,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts\/5154\/revisions"}],"predecessor-version":[{"id":5155,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts\/5154\/revisions\/5155"}],"wp:attachment":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/media?parent=5154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/categories?post=5154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/tags?post=5154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}