-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are two types of errors the candidate can encounter when using one login. Typical 500 errors and when a user uses the wrong email address We need to know what error the candidate gets to redirect them to the correct page. Prior to this change we are redirecting the candidate to wrong_email error page even if it's a 500 error page. Adding a error_type to the SessionError table makes it easier to distinguish between these errors. Better than storing this information in the session.
- Loading branch information
1 parent
a43c10b
commit 5845131
Showing
5 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
class SessionError < ApplicationRecord | ||
belongs_to :candidate, optional: true | ||
|
||
enum :error_type, { | ||
internal: 'internal', | ||
wrong_email_address: 'wrong_email_address', | ||
} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
- id_token_hint | ||
- body | ||
- omniauth_hash | ||
- error_type | ||
- created_at | ||
- updated_at | ||
:audits: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddErrorTypeToSessionError < ActiveRecord::Migration[8.0] | ||
def change | ||
add_column(:session_errors, :error_type, :string, default: 'internal') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.