   [s :- (s/maybe ESStoredSighting)]
   (when s (dissoc s :observables_hash)))
 
-(s/defn handle-create-sighting [state realized] :- StoredSighting
+(s/defn handle-create-sighting :- StoredSighting
+  [state realized]
   (let [create-fn (crud/handle-create :sighting ESStoredSighting)
         transformed (stored-sighting->es-stored-sighting realized)]
     (-> (create-fn state transformed)
         es-stored-sighting->stored-sighting)))
 
-(s/defn handle-read-sighting [state id] :- StoredSighting
+(s/defn handle-read-sighting :- (s/maybe StoredSighting)
+  [state id]
   (let [read-fn (crud/handle-read :sighting ESStoredSighting)]
     (-> (read-fn state id)
         es-stored-sighting->stored-sighting)))


(s/defn observable->observable-hash :- s/Str
  [{:keys [type value] :as obsrvable :- Observable}]
  (str (name type) ":" value))

(s/defn stored-sighting->es-stored-sighting :- (s/maybe ESStoredSighting)
  "adds an observables hash to a sighting"

(ns ctia.stores.es.sighting
  (:require [ctia.lib.pagination :refer [list-response-schema]]
            [ctia.stores.es.crud :as crud]
            [ctim.schemas
             [common :refer [Observable]]
             [sighting :refer [StoredSighting]]]
