Skip to content

Mashlib sends PATCH to container URLs causing 409 errors #14

Description

@melvincarvalho

Summary

Mashlib attempts to PATCH container URLs (ending in /), which JSS correctly rejects with 409. This causes console errors during normal mashlib operation.

Observed Behavior

Console shows repeated errors:

PATCH http://jss:4000/mel/ 409 (Conflict)
followOrCreateLink: Error making link in <http://jss:4000/mel/> to <http://jss:4000/publicTypeIndex.ttl>

Server Response

{"error": "Cannot PATCH containers"}

Analysis

JSS behavior is correct. Per Solid spec, containers cannot be PATCHed directly. The 409 response is appropriate.

Mashlib behavior appears incorrect. It's trying to:

  1. PATCH the container /mel/ to add type index links
  2. This should instead PATCH the profile document /mel/index.html or /mel/card

Code Location

JSS handler at src/handlers/resource.js:466:

if (isContainer(urlPath)) {
  return reply.code(409).send({ error: 'Cannot PATCH containers' });
}

Impact

  • Console noise (multiple 409 errors)
  • Type index links may not be created properly
  • No data loss (correctly rejected)

Potential Solutions

  1. Upstream fix in mashlib/solid-ui - PATCH profile document, not container
  2. JSS could return more helpful error - Include suggestion to PATCH profile document instead

Related URLs

  • Container: http://jss:4000/mel/
  • Profile document: http://jss:4000/mel/index.html
  • Type indexes: http://jss:4000/mel/settings/publicTypeIndex

Questions

  • Is mashlib expecting the container URL to resolve to a profile document?
  • Should JSS content-negotiate container requests to return profile RDF?

Status

  • Issue identified
  • Root cause in mashlib needs investigation
  • Determine if JSS should handle this differently

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions