Skip to content

[Bug] 401 Error When Adding New User #7

@Manoj-14

Description

@Manoj-14

Summary

Users are encountering a 401 Unauthorized error when attempting to add a new user through the User Management interface.

Description

When submitting the "Add New User" form in the User Management (CRUD Operations) section, the request fails with a status code 401 error. The form appears to accept user input correctly (First Name, Last Name, and Email fields are populated), but the submission fails during processing.

Steps to Reproduce

  1. Navigate to the User Management page
  2. Fill in the "Add New User" form with the following details:
  3. Click the "ADD USER" button
  4. Observe the error message: "Error: Request failed with status code 401"

Expected Behavior

The new user should be successfully created and added to the system without any authentication errors.

Actual Behavior

The request fails with a 401 Unauthorized status code, preventing the user from being added to the system.

Error Details

  • Status Code: 401 (Unauthorized)
  • Error Message: "Request failed with status code 401"
  • Form Data:

Possible Causes

  • Authentication token expired or missing
  • Insufficient permissions for the current user session
  • CORS configuration issues
  • Backend authentication middleware malfunction
  • API endpoint authentication requirements not met

Acceptance Criteria

  • Users can successfully add new users without authentication errors
  • Appropriate error handling for actual authentication failures
  • Proper validation of user input before submission
  • Clear error messages that guide users on how to resolve issues

Additional Notes

This appears to be an authentication/authorization issue rather than a validation problem, as the form accepts the input but fails during the API request. Please verify:

  1. Authentication token handling in the frontend
  2. Backend API endpoint authentication requirements
  3. User session management
  4. CORS configuration for the API endpoint
Image

Metadata

Metadata

Assignees

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions