mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 19:16:10 +02: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
|
(defn load-pointer
|
||||||
[conn file-id id]
|
[conn file-id id]
|
||||||
(let [row (db/get conn :file-data-fragment
|
(let [{:keys [content]} (db/get conn :file-data-fragment
|
||||||
{:id id :file-id file-id}
|
{:id id :file-id file-id}
|
||||||
{:columns [:content]
|
{:columns [:content]
|
||||||
::db/check-deleted? false})]
|
::db/check-deleted? false})]
|
||||||
(blob/decode (:content row))))
|
(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!
|
(defn- load-all-pointers!
|
||||||
[{:keys [data] :as file}]
|
[{:keys [data] :as file}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue