Log post creation failures (#2205)
This commit is contained in:
parent
1111108efe
commit
a0d006a1ac
2 changed files with 12 additions and 0 deletions
|
@ -62,6 +62,7 @@ import {useProfileQuery} from '#/state/queries/profile'
|
|||
import {useComposerControls} from '#/state/shell/composer'
|
||||
import {emitPostCreated} from '#/state/events'
|
||||
import {ThreadgateSetting} from '#/state/queries/threadgate'
|
||||
import {logger} from '#/logger'
|
||||
|
||||
type Props = ComposerOpts
|
||||
export const ComposePost = observer(function ComposePost({
|
||||
|
@ -228,6 +229,11 @@ export const ComposePost = observer(function ComposePost({
|
|||
})
|
||||
).uri
|
||||
} catch (e: any) {
|
||||
logger.error(e, {
|
||||
message: `Composer: create post failed`,
|
||||
hasImages: gallery.size > 0,
|
||||
})
|
||||
|
||||
if (extLink) {
|
||||
setExtLink({
|
||||
...extLink,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue