mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-24 02:46:19 -06:00
Update error messages & codes
This commit is contained in:
parent
f97c6d6f1e
commit
488f2f821e
2 changed files with 6 additions and 6 deletions
|
|
@ -107,7 +107,7 @@ func (p *Processor) Create(
|
|||
if now.Before(scheduledAt) {
|
||||
const errText = "scheduled statuses are not yet supported"
|
||||
err := gtserror.New(errText)
|
||||
return nil, gtserror.NewErrorBadRequest(err, errText)
|
||||
return nil, gtserror.NewErrorNotImplemented(err, errText)
|
||||
}
|
||||
|
||||
// If not scheduled into the future, this status is being backfilled.
|
||||
|
|
@ -168,7 +168,7 @@ func (p *Processor) Create(
|
|||
if mention.TargetAccountID != requester.ID {
|
||||
const errText = "statuses mentioning others can't be backfilled"
|
||||
err := gtserror.New(errText)
|
||||
return nil, gtserror.NewErrorBadRequest(err, errText)
|
||||
return nil, gtserror.NewErrorForbidden(err, errText)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ func (p *Processor) Create(
|
|||
if backfill {
|
||||
const errText = "statuses with polls can't be backfilled"
|
||||
err := gtserror.New(errText)
|
||||
return nil, gtserror.NewErrorBadRequest(err, errText)
|
||||
return nil, gtserror.NewErrorForbidden(err, errText)
|
||||
}
|
||||
|
||||
// Process poll, inserting into database.
|
||||
|
|
@ -356,7 +356,7 @@ func (p *Processor) processInReplyTo(
|
|||
if backfill && requester.ID != inReplyTo.AccountID {
|
||||
const errText = "replies to others can't be backfilled"
|
||||
err := gtserror.New(errText)
|
||||
return gtserror.NewErrorBadRequest(err, errText)
|
||||
return gtserror.NewErrorForbidden(err, errText)
|
||||
}
|
||||
|
||||
// Derive pendingApproval status.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue