Description:
While integrating and optimizing the frontend search and filtering mechanics with the api.peviitor.ro backend, we encountered two critical routing/processing issues. In both cases, instead of returning a standard JSON response (either the data or an empty [] array), the server throws a 404 Not Found error.
🪲 Issue 1: Spaces in query parameters cause 404 errors
When searching for a company using the /v1/company/ endpoint, if the name parameter contains a space (correctly URL-encoded by the browser as %20), the server fails to process the request.
Steps to reproduce:
- Make a GET request using a string with a space:
https://api.peviitor.ro/v1/company/?name=EPAM%20SYS
- Or use the exact, full name of a company from the database:
https://api.peviitor.ro/v1/company/?name=EPAM%20SYSTEMS%20INTERNATIONAL%20SRL
Expected behavior: The API should decode the %20, perform the search (with partial matching ideally), and return 200 OK with the company data (or an empty array [] if no match is found).
Actual behavior: The server immediately responds with 404 Not Found.
🪲 Issue 2: Multiple values for the same filter cause 404 errors
When a user selects multiple companies in the frontend filter, the frontend constructs the standard HTTP query string for arrays (?key=value1&key=value2). However, the /v1/search/ endpoint fails to process this format and returns a 404 error.
Steps to reproduce:
- Make a GET request to the search endpoint repeating the
company parameter:
https://api.peviitor.ro/v1/search/?company=EPAM&company=IBM
Expected behavior: The API should parse the multiple parameters, treat them as an OR condition, and return jobs belonging to either EPAM or IBM.
Actual behavior: The server responds with 404 Not Found.
💥 Impact on Frontend/UX:
- Users cannot search for companies using multiple words in the filter input.
- Users cannot filter jobs by more than one company at a time.
- The frontend has to aggressively catch these unexpected 404 routing errors to prevent the UI from displaying blank data or crashing.
💡 Suggested Fix:
Please check the backend routing and the Solr search engine configuration to ensure:
- It properly URL-decodes query string parameters (specifically handling
%20 to ).
- It correctly parses arrays from query strings when the same key is repeated.
- The engine returns
200 OK with {"companies": []} or {"jobs": []} instead of 404 when a query yields zero results.

Description:
While integrating and optimizing the frontend search and filtering mechanics with the
api.peviitor.robackend, we encountered two critical routing/processing issues. In both cases, instead of returning a standard JSON response (either the data or an empty[]array), the server throws a404 Not Founderror.🪲 Issue 1: Spaces in query parameters cause 404 errors
When searching for a company using the
/v1/company/endpoint, if thenameparameter contains a space (correctly URL-encoded by the browser as%20), the server fails to process the request.Steps to reproduce:
https://api.peviitor.ro/v1/company/?name=EPAM%20SYShttps://api.peviitor.ro/v1/company/?name=EPAM%20SYSTEMS%20INTERNATIONAL%20SRLExpected behavior: The API should decode the
%20, perform the search (with partial matching ideally), and return200 OKwith the company data (or an empty array[]if no match is found).Actual behavior: The server immediately responds with
404 Not Found.🪲 Issue 2: Multiple values for the same filter cause 404 errors
When a user selects multiple companies in the frontend filter, the frontend constructs the standard HTTP query string for arrays (
?key=value1&key=value2). However, the/v1/search/endpoint fails to process this format and returns a 404 error.Steps to reproduce:
companyparameter:https://api.peviitor.ro/v1/search/?company=EPAM&company=IBMExpected behavior: The API should parse the multiple parameters, treat them as an
ORcondition, and return jobs belonging to either EPAM or IBM.Actual behavior: The server responds with
404 Not Found.💥 Impact on Frontend/UX:
💡 Suggested Fix:
Please check the backend routing and the Solr search engine configuration to ensure:
%20to).200 OKwith{"companies": []}or{"jobs": []}instead of404when a query yields zero results.