Without debating the relative merits or wisdom of doing so, am I supposed to be able to override the handler for a particular resource for :handle-not-implemented
? I seem to be unable to do so but I’m still not used to our codebase and I want to verify that I can before I try to figure out why I cannot.
I think the “rub” as it were is that I really don’t want to return a 501 for this particular logical path but a 404 and well, someone or something disagrees with me.
You can override handlers which is at the gist of liberator’s model.
ok, I’ll have to dig deeper. I have a handler set for :handle-not-implemented
that sets the status and message to 404 and “Not Found” but it seems to get set right back to 501 and “Not Supported” in the end.
Are you sure you want to use :handle-not-implemented?
Anyways it works if called like this: ((resource :allowed-methods [:put] :exists? false :can-put-to-missing? false :handle-not-implemented “Buuuh”) {:request-method :put})
…or ((resource :allowed-methods [:put] :exists? false :can-put-to-missing? false :handle-not-implemented (ring-response "Buuuh" {:status 404})) {:request-method :put})
if you want to force the status code.
Hmm. I think I’m doing that and it’s still not cooperating. Let me make a minimal test case so I can figure out what’s going on. Thanks.