-
Notifications
You must be signed in to change notification settings - Fork 299
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
Version 2.10, REST API, POST new file, Error 500 #1748
Comments
Do you think that POSTMAN could mimic how curl is sending the request? |
Yes, i will figure it out, and make the suggestion of the change. I will try to fork the project to the local and test with postman. |
Im not so familiar with grizzly2 web server, but its possible to see, what the request is incomming from outside (like log setting)? Or just to see more info in log, like exceptions, in the DocumentApi class method uploadToDocumentService ? |
I think you can probably change the log level for those classes. Hopefully they are tracing everything. |
I have some news, i have tried from another module to use the Spring Rest API Client = WebTestClient, and the the REST API on the fscrawler its working very nice, i can upload with this way the attachments to process. So its a question, if needed to debug the communication with POSTMAN. The other nice to have could be the authentication of the REST API, with some API-KEY. |
I experienced the same behaviour, and traced it back by using Wireshark to compare the http requests to the name of the multipart part - if using anything else than "file" for the part I also get an error 500. With the name being "file" and unaltered settings, it seems to work. See attached wireshark screenshot and postman screenshot for reference for a working request. |
Amazing! So basically, I should "just" check that file is not empty and send a proper error message instead, I guess. |
Agreed. That'd be great to use Elasticsearch keys for that. |
Instead of producing a NPE, we now catch the problem (using the wrong field name `file` and return a proper error message. Closes #1748.
Describe the bug
Using the latest version, 2.10. Application is running.
Using POST Man as client, with the correct setting like in screenshot, i have got the error 500.
The method uploadToDocumentService is called according to the log, but no more information.
Logs
Expected behavior
An file should be uploaded to the app to be processed.
Versions:
Attachment
Screenshot of the POSTMAN calling
The text was updated successfully, but these errors were encountered: