mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 15:21:18 -05:00
✨ Add better error reporting on load-pointer function
This commit is contained in:
parent
1457b7cf38
commit
f1782f746d
1 changed files with 12 additions and 5 deletions
|
@ -170,11 +170,18 @@
|
|||
|
||||
(defn load-pointer
|
||||
[conn file-id id]
|
||||
(let [row (db/get conn :file-data-fragment
|
||||
{:id id :file-id file-id}
|
||||
{:columns [:content]
|
||||
::db/check-deleted? false})]
|
||||
(blob/decode (:content row))))
|
||||
(let [{:keys [content]} (db/get conn :file-data-fragment
|
||||
{:id id :file-id file-id}
|
||||
{:columns [:content]
|
||||
::db/check-deleted? false})]
|
||||
(when-not content
|
||||
(ex/raise :type :internal
|
||||
:code :fragment-not-found
|
||||
:hint "fragment not found"
|
||||
:file-id file-id
|
||||
:fragment-id id))
|
||||
|
||||
(blob/decode content)))
|
||||
|
||||
(defn- load-all-pointers!
|
||||
[{:keys [data] :as file}]
|
||||
|
|
Loading…
Add table
Reference in a new issue