mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 08:02:44 +08:00
Improve error messages.
This commit is contained in:
parent
69661be500
commit
e4d7e4fbe3
|
@ -182,7 +182,7 @@ class PostCreator
|
||||||
create
|
create
|
||||||
|
|
||||||
if !self.errors.full_messages.empty?
|
if !self.errors.full_messages.empty?
|
||||||
raise ActiveRecord::RecordNotSaved.new("Failed to create post", self)
|
raise ActiveRecord::RecordNotSaved.new("Failed to create post: #{self.errors.full_messages}")
|
||||||
end
|
end
|
||||||
|
|
||||||
@post
|
@post
|
||||||
|
|
Loading…
Reference in New Issue
Block a user