[GH-ISSUE #1369] Editing API key results in 404 error #858

Closed
opened 2026-03-02 02:19:32 +03:00 by kerem · 2 comments
Owner

Originally created by @NiceGuyIT on GitHub (Dec 8, 2022).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1369

Server Info (please complete the following information):

  • OS: Ubuntu 20.04.4 LTS (Focal Fossa)
  • Browser: Firefox 107.0 (64-bit)
  • RMM Version (as shown in top left of web UI): v0.15.4

Installation Method:

  • Standard
  • Docker

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): N/A
  • Agent OS: N/A

Describe the bug
Editing an API key returns an error.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Settings > Global Settings > API Keys
  2. Add a new API key
  3. Right click > Edit
  4. Change the date and click Submit.
  5. An error is displayed across the top. The returned document is HTML.
<!doctype html>
<html lang="en">
<head>
  <title>Not Found</title>
</head>
<body>
  <h1>Not Found</h1><p>The requested resource was not found on this server.</p>
</body>
</html>

Expected behavior
I expect the API key to be updated.

Screenshots
N/A

Additional context
The frontend submits a POST to /accounts/apikeys/[object%20Object]/. I suspect [object%20Object] is incorrect because creating a new API key submits a POST to /accounts/apikeys/.

As a side note, shouldn't the backend return a JSON instead of HTML for 404 errors?

Originally created by @NiceGuyIT on GitHub (Dec 8, 2022). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1369 **Server Info (please complete the following information):** - OS: Ubuntu 20.04.4 LTS (Focal Fossa) - Browser: Firefox 107.0 (64-bit) - RMM Version (as shown in top left of web UI): v0.15.4 **Installation Method:** - [X] Standard - [ ] Docker **Agent Info (please complete the following information):** - Agent version (as shown in the 'Summary' tab of the agent from web UI): N/A - Agent OS: N/A **Describe the bug** Editing an API key returns an error. **To Reproduce** Steps to reproduce the behavior: 1. Go to Settings > Global Settings > API Keys 2. Add a new API key 3. Right click > Edit 4. Change the date and click Submit. 5. An error is displayed across the top. The returned document is HTML. ```html <!doctype html> <html lang="en"> <head> <title>Not Found</title> </head> <body> <h1>Not Found</h1><p>The requested resource was not found on this server.</p> </body> </html> ``` **Expected behavior** I expect the API key to be updated. **Screenshots** N/A **Additional context** The frontend submits a POST to `/accounts/apikeys/[object%20Object]/`. I suspect `[object%20Object]` is incorrect because creating a new API key submits a POST to `/accounts/apikeys/`. As a side note, shouldn't the backend return a JSON instead of HTML for 404 errors?
kerem closed this issue 2026-03-02 02:19:32 +03:00
Author
Owner

@wh1te909 commented on GitHub (Dec 8, 2022):

thanks, fixed in github.com/amidaware/tacticalrmm-web@8f34f76a1d
no the default behavior is to return html 404, not json. that would require a custom override

<!-- gh-comment-id:1343509227 --> @wh1te909 commented on GitHub (Dec 8, 2022): thanks, fixed in https://github.com/amidaware/tacticalrmm-web/commit/8f34f76a1dc2140c46391c3938f33de20bbf1675 no the default behavior is to return html 404, not json. that would require a custom override
Author
Owner

@wh1te909 commented on GitHub (Dec 21, 2022):

fixed in 0.15.6

<!-- gh-comment-id:1362029857 --> @wh1te909 commented on GitHub (Dec 21, 2022): fixed in 0.15.6
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#858
No description provided.