[ https://issues.apache.org/jira/browse/OFBIZ-13278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18015620#comment-18015620 ]
Jacques Le Roux edited comment on OFBIZ-13278 at 8/22/25 9:10 AM: ------------------------------------------------------------------ I'm still missing something? Maybe a copy of your results will help? {noformat} Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 2108 0 --:--:-- --:--:-- --:--:-- 2145{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5516 0 --:--:-- --:--:-- --:--:-- 5619{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5639 0 --:--:-- --:--:-- --:--:-- 5900{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=blabla" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5424 0 --:--:-- --:--:-- --:--:-- 5619{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=blabla" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5917 0 --:--:-- --:--:-- --:--:-- 6210{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) {noformat} was (Author: jacques.le.roux): I'm still missing something? Maybe a copy of your results will help? {noformat} Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 2108 0 --:--:-- --:--:-- --:--:-- 2145{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5516 0 --:--:-- --:--:-- --:--:-- 5619{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5639 0 --:--:-- --:--:-- --:--:-- 5900{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=blabla" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5424 0 --:--:-- --:--:-- --:--:-- 5619{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) $ curl -k -X POST "https://localhost:8443/rest/services/createProject?inParams=blabla" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NTU4NTM2NjQsImV4cCI6MTc1NTg1NTQ2NCwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.DgyGm4gg3a7oIkrnmBrYBwrXgKz1_TzD5q1pAZWMhbV_a1qPmQUqFdM5SkOfI1bFVlTu62JApH0qmFT436wnKg" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 118 100 118 0 0 5917 0 --:--:-- --:--:-- --:--:-- 6210{ "statusCode" : 400, "statusDescription" : "Bad Request", "errorMessage" : "The request body is missing." } Jacques@LDLC MINGW64 /c/projectsASF/Git/ofbiz-framework (release24.09) {noformat} > Repeated REST API exception results in generic 500 error instead of specific > response > ------------------------------------------------------------------------------------- > > Key: OFBIZ-13278 > URL: https://issues.apache.org/jira/browse/OFBIZ-13278 > Project: OFBiz > Issue Type: Bug > Components: rest-api > Affects Versions: 24.09.02 > Reporter: Arashpreet Singh > Assignee: Deepak Dixit > Priority: Major > > When a REST API exposed via the {{rest-api}} module is called and an > exception occurs during execution, OFBiz initially returns an appropriate > error response. However, if the same API is called again and the exception > persists, OFBiz returns a generic HTTP 500 Internal Server Error without > providing the specific error message or exception details that were returned > on the first call. > *Steps to Reproduce:* > # Call a REST API (e.g., {{{}/rest/some-endpoint{}}}) that is expected to > raise an exception due to missing input, business logic failure, or invalid > state. > # Observe the first response – it contains a descriptive error message. > # Without fixing the root cause, call the same API again. > # The second response returns HTTP 500 Internal Server Error without the > original error message. > *Expected Behavior:* > * The API should return a consistent and descriptive error response each > time the same exception occurs, not a generic 500 error. -- This message was sent by Atlassian Jira (v8.20.10#820010)