-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error messaging when trying to attach a service connected to another account #259
Conversation
Codecov Report
@@ Coverage Diff @@
## master #259 +/- ##
==========================================
+ Coverage 66.99% 68.42% +1.42%
==========================================
Files 94 94
Lines 2136 2128 -8
==========================================
+ Hits 1431 1456 +25
+ Misses 705 672 -33
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some tests
if service.errors.details.has_key?(:uid) && service.errors.details[:uid].any? { |err| err[:error] == :taken } | ||
flash[:error] = "The #{service.type.split('::').last.titleize} account you are trying to connect is already connected to another #{APP_CONFIG['site_name']} account." | ||
else | ||
flash[:error] = t('flash.service.create.error') + service.errors.inspect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flash[:error] = t('flash.service.create.error') + service.errors.inspect | |
flash[:error] = t('flash.service.create.error') |
bd586d5
to
5a597fc
Compare
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
Closes #209