Skip to content

Commit 83600fc

Browse files
committed
Merge pull request #678 from code0-tech/copilot/sub-pr-670-another-one
Add missing invalid_totp_secret error code definition
2 parents 6d279ab + 152e74e commit 83600fc

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

app/services/error_code.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def self.error_codes
3030
mfa_required: { description: 'MFA is required' },
3131
invalid_login_data: { description: 'Invalid login data provided' },
3232
totp_secret_already_set: { description: 'This user already has TOTP set up' },
33+
invalid_totp_secret: { description: 'The TOTP secret is invalid or cannot be verified' },
3334
wrong_totp: { description: 'Invalid TOTP code provided' },
3435
invalid_verification_code: { description: 'Invalid verification code provided' },
3536
unmodifiable_field: { description: 'The user is not permitted to modify this field' },

docs/graphql/enum/errorcodeenum.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Represents the available error responses
1616
| `FAILED_TO_RESET_PASSWORD` | Failed to reset the user password |
1717
| `FAILED_TO_SAVE_VALID_BACKUP_CODE` | The new backup codes could not be saved |
1818
| `FLOW_NOT_FOUND` | The flow with the given identifier was not found |
19+
| `FLOW_TYPE_NOT_FOUND` | The flow type with the given identifier was not found |
1920
| `FLOW_VALIDATION_FAILED` | The flow validation has failed |
2021
| `GENERIC_KEY_NOT_FOUND` | The given key was not found in the data type |
2122
| `IDENTITY_NOT_FOUND` | The external identity with the given identifier was not found |
@@ -33,6 +34,7 @@ Represents the available error responses
3334
| `INVALID_PASSWORD_REPEAT` | The provided password repeat does not match the password |
3435
| `INVALID_RUNTIME` | The runtime is invalid because of active model errors |
3536
| `INVALID_SETTING` | Invalid setting provided |
37+
| `INVALID_TOTP_SECRET` | The TOTP secret is invalid or cannot be verified |
3638
| `INVALID_USER` | The user is invalid because of active model errors |
3739
| `INVALID_USER_IDENTITY` | The user identity is invalid because of active model errors |
3840
| `INVALID_USER_SESSION` | The user session is invalid because of active model errors |

docs/graphql/object/flowvalidationerror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: FlowValidationError
33
---
44

5-
Represents an flow validation error
5+
Represents a flow validation error
66

77
## Fields without arguments
88

spec/services/users/identity/register_service_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ def setup_identity_provider(identity)
3838

3939
it 'creates the audit event' do
4040
expect { service_response }.to create_audit_event(
41-
:user_registered,
42-
entity_type: 'User',
43-
details: { 'provider_id' => provider_id.to_s, 'identifier' => 'identifier' },
44-
target_type: 'User'
45-
)
41+
:user_registered,
42+
entity_type: 'User',
43+
details: { 'provider_id' => provider_id.to_s, 'identifier' => 'identifier' },
44+
target_type: 'User'
45+
)
4646
end
4747

4848
context 'when user registration is disabled' do

0 commit comments

Comments
 (0)