pledge4future / WePledge

WebApp to calculate work related CO2e emissions from heating and electricity consumption as well as business trips and commuting.
https://pledge4future.org
GNU General Public License v3.0
6 stars 2 forks source link

Bug Collection Emission Planner Endpoint #176

Open codingfabi opened 2 years ago

codingfabi commented 2 years ago

This is a bug collection issue of the status quo of the emission planner backend endpoint.


Description: Transportation mode plane together with addresses not working. Request:

{
    "transportationMode": "Plane",
    "seatingClass": "economy class",
    "distance": 0,
    "startAddress": "MockStreet",
    "startCity": "Heidelberg",
    "startCountry": "Germany",
    "destinationAddress": "MockStreetBerlin",
    "destinationCity": "Berlin",
    "destinationCountry": "Germany"
}

Response:

1 validation error for Airportiata_code str type expected (type=type_error.str)

PlugIn Hybrig is not a valid fuel type. Request:

{
    "transportationMode": "Car",
    "size": "Average",
    "fuelType": "Plug_In Hybrid",
    "distance": "30"
}

Response:

{
    "success": false,
    "message": "1 validation error for CarEmissionParameters\nfuel_type\n  'plug_in_hybrid' is not a valid CarFuelType (type=value_error)",
    "co2e": null,
    "__typename": "PlanTrip"
}
han16nah commented 2 years ago

This is a bug collection issue of the status quo of the emission planner backend endpoint.

Description: Electricity Car not working. Request: { "success": false, "message": "index 0 is out of bounds for axis 0 with size 0", "co2e": null, "__typename": "PlanTrip" } Response: 'index 0 is out of bounds for axis 0 with size 0'

Description: Transportation mode plane together with addresses not working. Request: { "transportationMode": "Plane", "seatingClass": "economy class", "distance": 0, "startAddress": "MockStreet", "startCity": "Heidelberg", "startCountry": "Germany", "destinationAddress": "MockStreetBerlin", "destinationCity": "Berlin", "destinationCountry": "Germany" } Response: 1 validation error for Airportiata_code str type expected (type=type_error.str)

What was the query for the electric car that was not working?

codingfabi commented 1 year ago

What was the query for the electric car that was not working?

I can't remember but it seems to work now :)

codingfabi commented 1 year ago

More issues extracted from : #313