Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting folder with incorrect siteId is a 500 vs. 404 (or 401) #144

Closed
reganwolfrom opened this issue Jul 6, 2023 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@reganwolfrom
Copy link
Member

When attempting to delete from a different site (not default), this request was made:
DELETE /indices/folder/%23my-mail?siteId=default

Instead of returning a 404 (or a 401, which might be more technically correct), it returns a 500.

@reganwolfrom reganwolfrom added the invalid This doesn't seem right label Jul 6, 2023
@mfriesen mfriesen added this to the v1.12.0 milestone Jul 22, 2023
@mfriesen mfriesen added bug Something isn't working and removed invalid This doesn't seem right labels Jul 22, 2023
@mfriesen
Copy link
Member

{
"requestId": "IjFuigq_iYcEMGg=",
"ip": "50.71.0.58",
"requestTime": "24/Jul/2023:03:01:35 +0000",
"httpMethod": "DELETE",
"routeKey": "DELETE /indices/{indexType}/{indexKey}",
"pathParameters": {
"indexKey": "#Office",
"indexType": "folder"
},
"protocol": "HTTP/1.1",
"user": "regan@formkiq.com",
"queryParameters": {
"siteId": "default"
}
}

2023-07-24T03:01:36.004Z java.lang.NullPointerException
2023-07-24T03:01:36.004Z at com.formkiq.stacks.dynamodb.FolderIndexProcessorImpl.deleteEmptyDirectory(FolderIndexProcessorImpl.java:207)
2023-07-24T03:01:36.004Z at com.formkiq.stacks.api.handler.IndicesRequestHandler.delete(IndicesRequestHandler.java:79)
2023-07-24T03:01:36.004Z at com.formkiq.aws.services.lambda.AbstractRestApiRequestHandler.callHandlerMethod(AbstractRestApiRequestHandler.java:148)
2023-07-24T03:01:36.004Z at com.formkiq.aws.services.lambda.AbstractRestApiRequestHandler.processRequest(AbstractRestApiRequestHandler.java:436)
2023-07-24T03:01:36.004Z at com.formkiq.aws.services.lambda.AbstractRestApiRequestHandler.processApiGatewayRequest(AbstractRestApiRequestHandler.java:374)
2023-07-24T03:01:36.004Z

mfriesen added a commit that referenced this issue Aug 14, 2023
* #130 - Feature: Added PUT/PATCH /documents/{documentId}/tags to allow adding/updating multiple tags to a document at once

* #131 - Feature: Added POST /documents/compress to create a ZIP file of multiple document's contents.

* #133 - Feature: Added PATCH /documents/tags to allow adding tags to documents based on tag search criteria

* #138 - Bug: Added validation for reservered tag keys when using POST /documents

* #144 - Bug: DELETE /indices/folder return 500 when invalid siteId is used

* #145 - Feature: Added Typesense support to API GET documents/{id}/fulltext

* #150 - Bug: Renamed module 'fulltext' to 'opensearch'

* #151 - Bug: Documentation for POST /documents/upload, missing contentLength

* #158 - Bug: Improved Actions API validation

* #159 - Feature: API Keys added READ / WRITE / DELETE permissions

* #161 - Bug: POST /documents/upload generates incorrect URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants