mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 22:21:55 +08:00
Improve error messages.
This commit is contained in:
parent
69661be500
commit
e4d7e4fbe3
|
@ -182,7 +182,7 @@ class PostCreator
|
|||
create
|
||||
|
||||
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
|
||||
|
||||
@post
|
||||
|
|
Loading…
Reference in New Issue
Block a user