https://avo.cool logo
In production when trying to create a new resou...
# avo-2
f
In production when trying to create a new resource (an article, for instance), I'm getting "You might have missed something. Please check the form." with no additional context. The exact same form works fine locally. Production server logs aren't showing any particular error messages either.
m
Thread automatically created by Shpigford in #740893011994738751
l
Hmm, the error gets eaten up somehow
I'm looking into it on Avo 3 right now
Copy code
ruby

    def perform_action_and_record_errors(&block)
      begin
        succeeded = block.call
      rescue => exception
        # In case there's an error somewhere else than the model
        # Example: When you save a license that should create a user for it and creating that user throws and error.
        # Example: When you Try to delete a record and has a foreign key constraint.
        exception_message = exception.message
      end

      # Add the errors from the model
      @errors = @model.errors.full_messages.reject { |error| exception_message.include? error }.unshift exception_message

      succeeded
    end
add this method to the controller of that resource and output
exception_message
somehow
then deploy to the server
that's likely what's eating up the error
f
Just pulled latest from the main commits in to production and it's now showing additional context on the error (not sure if that code block above is included in those recent commits)
l
it could be
this snippet is from
main
I'm working on this PR to surface those errors better
can you share what are you building with Avo?
f
Using it to manage content on https://maybe.co
l
oh, that's cool! I heard about maybe