Skip to content
lyang edited this page Mar 17, 2013 · 2 revisions

BraintreeRails has two specific Exceptions

BraintreeRails::RecordInvalid

This got thrown when (save|create|update)! failed validation.

BraintreeRails::RecordInvalid#record

This is the record that failed validation.

BraintreeRails::RecordInvalid#message

This is the joined full messages of all the errors.

BraintreeRails::NotSupportedApiException

This got thrown when trying to call not supported CRUD methods on certain models. For example

# Throws BraintreeRails::NotSupportedApiException because Plan is a readonly model.
BraintreeRails::Plan.create(:plan_id => 'plan')
Clone this wiki locally