![]() Add some unnecessary code here like class Users::CustomController ->(env, exception) Go to the controller > users > custom controller and edit the home method. You already know that our app root URL is custom controller home path, so add some wrong code there. For this, we have to create an exception. Now we have successfully integrated the exception notifier, so now it's time to test it. It uses the slack app to send the error which has: webhook URL: our channel webhook incoming URL (that url which was saved in our notes before channel: Channel name into which you want to see the errors markdown: It accepts the markdown text Testing webhooks ![]() It uses the middleware configuration of the app and calls the ExceptionNotification::Rack module which is defined in exception notifier gem. The above code will help to send webhooks whenever an exception occurs in ruby on rails app. Now we go to the project and open development.rb file of your project add the following code After saving it go to your channel see a new message says 'user added an integration to the channel: incoming-webhooks' which means the selected channel is successfully integrated to the webhook, if you did not receive this message then please verify all the steps, see references screenshot below: we will require this URL later and also save the configuration. Now copy the webhook URL from there and paste it into your notes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |